
Setting the normal coordinates system in graphics (Simple Line)
Option Explicit
Private Sub Command1_Click()
Command1.Top = 0
Me.AutoRedraw = True
Me.ScaleMode = vbPixels
' --- Set Coordinate system
Me.ScaleTop = -Me.ScaleHeight / 2
Me.ScaleLeft = -Me.ScaleWidth / 2
' --- Show X at 0, 0
Me.CurrentY = 0
Me.CurrentX = 0
Me.Print "X"
' --- Show Pixel at 0, 0
Me.PSet (0, 0), vbRed
' --- Show Lowest Pixel
Me.PSet (0, Me.ScaleHeight / 2 - 1), vbGreen
End Sub
Quote:
>Dear all..
> I have this query about the graphics. When trying to draw lines, it
>is seen that the top left corner is set to (0,0) coordinates
>defaultly. But, i want it to be at the middle of the frame or picture
>box(whatever is being used.)-Something like a full coordinate system
>to draw lines from negative points too.So, what i meant is , can we
>have a method or any means by which the coordinate system can be set
>by us at our own wish..Please help me out.
> Thanks for any kind of replies.
>Regards,
>Pavs.