|
-
March 29th, 2001, 12:45 AM
#1
VB Coordinate System
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
-
April 5th, 2001, 04:56 PM
#2
Re: VB Coordinate System
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.
David H. Straayer
-
April 9th, 2001, 01:37 AM
#3
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|