|
-
Aug 23rd, 2011, 06:34 PM
#1
Thread Starter
New Member
Round to the nearest 50th
Hey, i have been looking around on the internet a lot but i could find any answers. Here's what i need. I have 4 variables. Xx, Yy, Xxx, and yyy(integers). Got that? Moving on. When i click on a form, i use this code
Code:
Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
If e.Button = Windows.Forms.MouseButtons.Left Then
xx=e.x
yy=e.y
End If
End Sub
assumeing thats the right code to find the x and y values of where i'm clicking on the form, i want to round the xx and yy variables to the nearest 50th,whether its up or down, and then have them equal the xxx and yyy variables. Now, how do i do that? And it would be much appreciated if you explain it in a basic way.(optional) Ty
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
|