• Log in or sign up for an account here: https://www.sythe.org/login

How can I view the coordinates while debugging?

redawsomeness

Forum Addict

Banned
Joined
Jul 28, 2010
Sythe Gold
0
Messages
614
Hello Sythe Members,

I was looking to build a small little bot using Visual Basic as practice programming. Now, I want to make it click as coordinates and I was wondering how can I view the coordinates of your mouse while debugging the application? When I say coordinates, I mean like (x,y) on the screen. If anybody knows how to accomplish this or an alternative of doing what I was planning on doing to make the bot click in the game, please tell me and that would help me out a lot.

Thanks! :D
 
I think this is what your looking for if not let me know:

"
Private Sub form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
Dim MLocX As Integer
Dim MLocY As Integer

MLocX = MousePosition.X
MLocY = MousePosition.Y

Me.Label1.Text = MLocX & " " & MLocY
"

Basically open up the form and go to events. Then scroll down until you find mousemove. Select mousemove and put in the above code. Rename the label to your preference and it will display the location of your mouse while on the form.

Hope it helped.
 
it doesn't say that there is an error, but when it gets down to putting it on the label, it won't display. I even erased the "label 1" text on the label in the designer but it still doesn't seem to work.
 
What your aiming for.
Capture3.png


This is what it should look like before debugging
Capture2.png


This is the code for displaying the mouse position
Capture1.png





Here are the screenshots. I just tested the code out and it worked fine for me. If I could see the source code for your project that might help (Not the entire project just the area that your attempting this in).
 
What your aiming for.
Capture3.png


This is what it should look like before debugging
Capture2.png


This is the code for displaying the mouse position
Capture1.png





Here are the screenshots. I just tested the code out and it worked fine for me. If I could see the source code for your project that might help (Not the entire project just the area that your attempting this in).

Thank you for the screenshots! I have gotten it to work now, but the only issue is that it doesn't update the location of the mouse when I'm in the web browser window of the application. For everything else it seems to work fine though.
 
Runescape Gamblingrunescape gambling
Back
Top