Click to See Complete Forum and Search --> : Draw a line from point A to point B


AndyK
October 6th, 1999, 03:22 PM
Sound easy right...........how about that I need to do it on coordinate plane where X-axis is 50 and Y-axis is 50 (i thought about using my form's X and Y, but scale them so that if A (5;6) then it will display a point on form maybe....A(500;600) or whatever, but what formula can I use to scale that....i tried lots of stuff...none works.....basically all I need is to draw a line from A to B and use my form as coordinate plane, but scale it so that x = 5 and x = 10 have a visible difference....if i plug those Xs onto my form right now, then x = 5 and x = 30 don't have any visible difference at all (line will move maybe like a fraction of a milimeter (less then a 1/16 of an inch), but I need is that if x = 5 and x = 6 then it has difference about 5 milimeters on the form (line will move like 5 mm so that change in position of a line will be visible)
I hope that won't confuse you........Thank You

Aaron Young
October 6th, 1999, 03:53 PM
All you need to do is set the Controls ScaleWidth and ScaleHeight Properties to your own Coordinate System, eg.

If you set the Forms ScaleWidth to 4 and the ScaleHeight to 4, then place a point at 2,2 it'll appear in the center of the form, because you've split the form into sections 5 across (0 - 4) by 5 down (0 - 4),eg..


private Sub Command1_Click()
ScaleWidth = 4
ScaleHeight = 4
me.PSet (2, 2)
End Sub







Aaron Young
Analyst Programmer
adyoung@win.bright.net
aarony@redwingsoftware.com