How can I view the coordinates while debugging?

Discussion in 'Programming General' started by redawsomeness, Nov 11, 2010.

How can I view the coordinates while debugging?
  1. Unread #1 - Nov 11, 2010 at 12:28 PM
  2. redawsomeness
    Joined:
    Jul 28, 2010
    Posts:
    614
    Referrals:
    1
    Sythe Gold:
    0

    redawsomeness Forum Addict
    Banned

    How can I view the coordinates while debugging?

    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
     
  3. Unread #2 - Nov 11, 2010 at 5:20 PM
  4. daLt0n
    Joined:
    Nov 11, 2010
    Posts:
    7
    Referrals:
    0
    Sythe Gold:
    0

    daLt0n Newcomer

    How can I view the coordinates while debugging?

    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.
     
  5. Unread #3 - Nov 11, 2010 at 6:38 PM
  6. redawsomeness
    Joined:
    Jul 28, 2010
    Posts:
    614
    Referrals:
    1
    Sythe Gold:
    0

    redawsomeness Forum Addict
    Banned

    How can I view the coordinates while debugging?

    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.
     
  7. Unread #4 - Nov 11, 2010 at 6:51 PM
  8. daLt0n
    Joined:
    Nov 11, 2010
    Posts:
    7
    Referrals:
    0
    Sythe Gold:
    0

    daLt0n Newcomer

    How can I view the coordinates while debugging?

    What your aiming for.
    [​IMG]

    This is what it should look like before debugging
    [​IMG]

    This is the code for displaying the mouse position
    [​IMG]




    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).
     
  9. Unread #5 - Nov 12, 2010 at 12:52 PM
  10. redawsomeness
    Joined:
    Jul 28, 2010
    Posts:
    614
    Referrals:
    1
    Sythe Gold:
    0

    redawsomeness Forum Addict
    Banned

    How can I view the coordinates while debugging?

    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.
     
< Where do I Start? | Program Ideas >

Users viewing this thread
1 guest


 
 
Adblock breaks this site