Results 1 to 6 of 6

Thread: Mouse outside form\Mouse invisible

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2000
    Location
    FL
    Posts
    76

    Question

    How do you see the x,y cordinates outside a form and how do you make the mouse cursor invisible

  2. #2
    Hyperactive Member tumblingdown's Avatar
    Join Date
    Mar 2000
    Posts
    362
    Try this...

    Public Type POINTAPI
    x As Long
    y As Long
    End Type

    Public Declare Function GetCursorPos Lib "user32" Alias "GetCursorPos" (lpPoint As POINTAPI) As Long
    "One logical slip and an entire scientific edifice comes tumbling down." - Robert M. Pirsig


    [email protected]

    "but if Einstein is right and God is in the details, reality requires that we sometimes get religion." - Scott Meyers.

  3. #3
    Addicted Member
    Join Date
    Jun 2000
    Posts
    175
    Go see MouseMove Event Post. You get more than an answer
    Mass

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jun 2000
    Location
    FL
    Posts
    76

    Wink code

    where would i put the code that you just wrote?
    in general
    or a form
    or a module?

  5. #5
    Hyperactive Member tumblingdown's Avatar
    Join Date
    Mar 2000
    Posts
    362
    anywhere you want ;-)...

    you could put it as private in a form, or in a module as public to anything.
    "One logical slip and an entire scientific edifice comes tumbling down." - Robert M. Pirsig


    [email protected]

    "but if Einstein is right and God is in the details, reality requires that we sometimes get religion." - Scott Meyers.

  6. #6
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Thumbs up ShowCursor API

    With the ShowCursor API function will be able to show/hide a mouse cursor anywhere + anytime you want it to be.

    Code:
    Option Explicit
    Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
    
    Private Sub Command1_Click()
    'Hide the mouse cursor
    ShowCursor False
    End Sub
    
    Private Sub Command2_Click()
    'Display the mouse cursor
    ShowCursor True
    End Sub

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