Results 1 to 6 of 6

Thread: Simple Mouse Location Question.

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2014
    Posts
    21

    Angry Simple Mouse Location Question.

    Code:
       Private Sub RectangleShape1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles RectangleShape1.MouseEnter
            Cursor.Position = New Point(3, 3)
        End Sub
    This returns the Cursor Position outside the form.

    How do I make it so it goes to this position at the top left corner of the form instead of the top left of the screen?

  2. #2
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Simple Mouse Location Question.

    You're asking your question in the wrong Forum. You have VB.NET so that is where you need to present your questions.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Apr 2014
    Posts
    21

    Re: Simple Mouse Location Question.

    Okay, Last time I posted. I was told to change thread to VB6 and earlier. Then I moved to here, Now I'm being told to go back.

    I have Visual Basic Express 2010. What category does that put me in?

  4. #4
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: Simple Mouse Location Question.

    All VB versions after 1998 are Vb.Net

  5. #5
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,598

    Re: Simple Mouse Location Question.

    You must have posted something that was inferred to be VB6.
    In any case, why not add the position of the form to the coordinates.
    Cursor.Position = New Point(Me.Left + 3, Me.Top + 3)

  6. #6
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,370

    Re: Simple Mouse Location Question.

    Moderator Action: Moved the thread to the VB.Net forum.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width