Or you can atleast setup a two-axis coordinate system in a picture box using the Scale method (or statement).
Here is how it goes...
Draw a (big enough) picture box on your form and paste the following code in it. It will setup a normal X-Y plane with X=-100, Y=100 on the top-left corner and X=100, Y=-100 on the bottom-right corner.
Move your mouse around the picture box, the coordinates of the underneath point will appear in tooltip.
__
[tt]
Private Sub Form_Load()
Picture1.Scale (-100, 100)-(100, -100)
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.ToolTipText = "(" & Int(X) & ", " & Int(Y) & ""
End Sub
[/tt]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.