|
-
Sep 20th, 2010, 08:58 PM
#1
Thread Starter
Addicted Member
[RESOLVED] XY coords from Mouse click
I am working with a PictureBox and trying to click on the picture and OnClick i want to capture XY coord from the cursor.
I am using the following code
Private Sub PictureBox1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseClick
Dim X As Long
Dim Y As Long
Text1.Text = Text1.Text & X & " "
Text2.Text = Text2.Text & Y & " "
End Sub
The issue i have is that no matter where i click on the picturebox it returns a 0 for both the X and Y coordinates.
I read something somewhere about seting the Scale to Pixel but that doesnt seem to be working for me.
Any help would be greatly appreciated.
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
|