I would like to know what are the use of ScaleHeight, ScaleLeft, ScaleTop, ScaleWidth, ScaleX, ScaleY). I don't have basic in coordinate system in visual basic. Need some explaination. Why the default coordinate system on the upper-left corner?
Printable View
I would like to know what are the use of ScaleHeight, ScaleLeft, ScaleTop, ScaleWidth, ScaleX, ScaleY). I don't have basic in coordinate system in visual basic. Need some explaination. Why the default coordinate system on the upper-left corner?
Why don't you take a look in here: http://msdn.microsoft.com/en-us/libr...(v=vs.60).aspx
It gets even more bizarre, but we accept what we cannot change.
When specifying a point as (x, y) the cartesian coordinates are mirrored on the Y axis from what might feel conventional. I.e. Y grows down rather than up.
However radial coordinates, by which I mean angles as used in drawing circles and arcs via the Circle method, still grow counter-clockwise... instead of the clockwise you'd expect given the mirrored cartesian plane.
And negative angle values are not negative angle values, but positive angles where the "sign" indicates you want a line drawn from the arc's endpoint to the center.
Just for grins:
Code:Option Explicit
'upperleft: (-,+)
'upperright: (+,+)
'lowerleft: (-,-)
'lowerright: (+,-)
Private Sub Form_Load()
AutoRedraw = True
ScaleMode = vbPixels
Me.Scale (-ScaleWidth, ScaleHeight)-(ScaleWidth, -ScaleHeight)
Line (-ScaleWidth, 0)-(ScaleWidth, 0)
Line (0, -ScaleHeight)-(0, ScaleHeight)
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Caption = "X: " & X & " Y: " & Y
End Sub