I'm trying to make the mouse disappear and reappear during a full screen slide presentation.
10-02-2005 at 07:41 PM
|
Goran Level: Moderator Registered: 16-05-2002 Posts: 1681
Re: Making the mouse cursor disappear/reappear
A trick can do the job: make a cursor that is transparent, and assign this cursor to your cursor icon, so it would look like it dissapeared.
____________________________
If you find the answer helpful, please mark this topic as solved.
11-02-2005 at 12:59 AM
|
steve_w Level: Moderator Registered: 18-04-2003 Posts: 1156
Re: Making the mouse cursor disappear/reappear
Hey Goran, surprised you didn't get this one
Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
Showcursor 0 ' hide
ShowCursor 1 ' Show
Steve
11-02-2005 at 06:43 PM
|
humberto Level: VB Lord Registered: 13-01-2005 Posts: 246
Re: Making the mouse cursor disappear/reappear
Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
Private Sub Form_Load()
'Hide the cursor
ShowCursor 0
'Wait 10 seconds
t = Timer
Do: DoEvents: Loop Until Timer > t + 10
'Show the cursor
ShowCursor 1
End Sub
11-02-2005 at 06:47 PM
|
Goran Level: Moderator Registered: 16-05-2002 Posts: 1681
Re: Making the mouse cursor disappear/reappear
Hey Steve, yes I know of that one, as it can be seen in this old topic, where I also posted how to bypass mouse events (they will still exist even if you hide the cursor). But it was overpressed with vbgen's very interesting idea (look at vbgen's post in that topic), to make cursor bitmap transparent, and I was surprised by the simplicity of the idea, so that is why It was the first thing to suggest. I appreciate if some manage to find a workaround soulution, even if it is the harder way (as in this case).
____________________________
If you find the answer helpful, please mark this topic as solved.
11-02-2005 at 08:07 PM
|
steve_w Level: Moderator Registered: 18-04-2003 Posts: 1156
Re: Making the mouse cursor disappear/reappear
Bet you forgot then . Just joking.
I can see the advantage with that being the cursor is only invisible while it is over the form.
I've attached a blank cursor if anyone wants it. Don;t forget to set the mouseicon property and the mousepointer property to 99 - Custom
Goran Level: Moderator Registered: 16-05-2002 Posts: 1681
Re: Making the mouse cursor disappear/reappear
Yes, that is an important advantage for transparent cursor. With ShowCursor API, you would have to use SetCapture/ReleaseCapture API's so you can track mouse movement out of the form and showing cursor...
____________________________
If you find the answer helpful, please mark this topic as solved.