I would like to know how to setup a coordinate system in picturebox control to solve mathermatics question. Example a coordinate system with X-Axis range from -50 to 50cm and Y-Axis range from -50 to 50.
Regards
Printable View
I would like to know how to setup a coordinate system in picturebox control to solve mathermatics question. Example a coordinate system with X-Axis range from -50 to 50cm and Y-Axis range from -50 to 50.
Regards
Create a project with a default-named picturebox and two labels. Paste in this code:
option Explicit
private Sub Form_Load()
Picture1.ScaleHeight = -100
Picture1.ScaleTop = 50
Picture1.ScaleLeft = -50
Picture1.ScaleWidth = 100
End Sub
private Sub Picture1_MouseMove(Button as Integer, Shift as Integer, X as Single, Y as Single)
Label1.Caption = "X:" & Str$(X)
Label2.Caption = "Y:" & Str$(Y)
End Sub
Dave Straayer
Varatouch, Inc.
Thank you.