Results 1 to 7 of 7

Thread: Hide Mouse

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    8

    Unhappy

    Anyone know how to hide the mouse pointer when over certain objects - or make it disapear on a form totaly?
    Any help would be greatly appriciated
    thanks

  2. #2
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    India
    Posts
    298
    u can use the ShowCursor API to hide/show the mouse pointer.

    'Declaration
    Public Declare Function ShowCursor Lib "user32" Alias "ShowCursor" (ByVal bShow As Long) As Long


    To hide the mousepointer:

    ShowCursor false


    To show the mousepointer:

    ShowCursor true




  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    8

    Smile

    Thanks for the help
    If possible could you give a little more detail as I was unable to get it to work

  4. #4
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    India
    Posts
    298

    Thumbs up

    As a simple example try this:

    create a form named Form1 with 2 command buttons.

    name them cmdhide and cmdshow

    copy this code to form1:

    Code:
    'Form1's code:
    
    Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
    
    Private Sub cmdhide_Click()
        ShowCursor False
    End Sub
    
    Private Sub cmdshow_Click()
        ShowCursor True
    End Sub

    click cmdhide to hide the mousepointer and cmdshow to show the mousepointer.

    hope this helps..... :-)


    [Edited by rammy on 10-03-2000 at 05:25 AM]

  5. #5

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    8

    Talking THANKS

    Thanks you very much
    works great!!

  6. #6
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    India
    Posts
    298

    Cool

    ur welcome....glad i could help!

  7. #7
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    you can also do this:

    to make cursor vanish over a control, create a transparent cursor file (.cur) or icon (.ico)

    set the control's mousepointer property to 99

    set the controls mouseicon property to your transparent .cur or .ico file

    run program

    voila!
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

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