Results 1 to 7 of 7

Thread: disable/enable mouse

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2000
    Posts
    39

    Talking

    Hi,

    Does anybody know a way to disable/enable the mouse and see if the mouse even exist in hardware profile?

    Thanks

  2. #2
    Fanatic Member Mad Compie's Avatar
    Join Date
    Aug 2000
    Location
    Kuurne (Belgium)
    Posts
    553
    I think you could use this:

    Code:
    Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
    Private Sub Form_Load()
        ShowCursor 0     'Hide the cursor
        'Wait 10 seconds
        t = Timer
        Do: DoEvents: Loop Until Timer > t + 10    
        ShowCursor 1 'Show the cursor
    End Sub
    But this only hides the pointer, it does not disable it.
    I'll try to look at other possibilities.

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  4. #4
    Fanatic Member Mad Compie's Avatar
    Join Date
    Aug 2000
    Location
    Kuurne (Belgium)
    Posts
    553

    Talking

    Wright, Kedaman!
    It was the ClipCursor thing.

  5. #5
    Guest

    Lightbulb

    Some APIs are not in Win2000, so you can set the cursor position into a form and add:

    Code:
    Private Sub Form_Mousemove()
        'code for setting cursor position
    End Sub
    Strange how I could suggest AGAINST API. [!]

  6. #6
    Fanatic Member Mad Compie's Avatar
    Join Date
    Aug 2000
    Location
    Kuurne (Belgium)
    Posts
    553
    Consider that with your approach the mouse event still occurs. Clipcursor reduces the mouse area to a zero-sized rect, which really disables your mouse. So, I stay with Kedaman's approach...

  7. #7
    Guest

    Unhappy

    OK, mc, I guess you're right. I really messed up that one, and I'm sorry.

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