Advice on vb graphics
By john g in VB.NET

Hi

I have been searching the internet for some time but am none the wiser reguarding my problem.

I am trying to build a drawing application

The idea is to use mouse down, mouse move, mouse up events

On mouse down obtain startX and startY

Then on mouse move draw a rubberband line example below whilst the line is being drawn the measurement is shown at the end of the line

(startX,startY).----------------------------------------------------1.024m

Then on mouse up event the line is actually drawn to screen.

********************

My problem is as follows

********************

I have a screen size of 1024,768 therfore

if i have the scale as say 50 metres because height less than lenght scale: me.ClientRectangle.Height / 50

this gives me approx 15 pixels per linear metre

seeing as theres 1000 millimetres in 1 linear metre when i drag the mouse to draw the rubber band line the measurement

increments are to high as really i would need 1000 pixels per metre which is obviously not possible

there is obviously a way over this problem as there are programes out there that do it

any advice or direction would be great

Thanks very much

John

Why not create a radio/checkbox field with a event handler to change your math to reflect your change in measurement. The screen stays the same but the unit will not.

Why not create a radio/checkbox field with a event handler to change your math to reflect your change in measurement. The screen stays the same but the unit will not.

really dont understand what you mean can you please explain further
thanks for your reply
John

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.