borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (How do i disable ALT-F4)Next Topic (Editing FlexGrid) New Topic New Poll Post Reply
AndreaVB Forum : VB General : Making the mouse cursor disappear/reappear
Poster Message
leondavisjr
Level: Protégé

Registered: 31-01-2005
Posts: 6

icon Making the mouse cursor disappear/reappear

I'm trying to make the mouse disappear and reappear during a full screen slide presentation.

10-02-2005 at 07:41 PM
View Profile Send Email to User Show All Posts | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon 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
View Profile Send Email to User Show All Posts | Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1156
icon 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
View Profile Send Email to User Show All Posts | Quote Reply
humberto
Level: VB Lord

Registered: 13-01-2005
Posts: 246
icon 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
View Profile Send Email to User Show All Posts | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon 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
View Profile Send Email to User Show All Posts | Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1156
icon 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


Steve

____________________________
Attached:
Blank.zip 1 KB (Downloads: 22)

12-02-2005 at 02:33 PM
View Profile Send Email to User Show All Posts | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon 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.

12-02-2005 at 03:53 PM
View Profile Send Email to User Show All Posts | Quote Reply
leondavisjr
Level: Protégé

Registered: 31-01-2005
Posts: 6
icon Re: Making the mouse cursor disappear/reappear

Thank you for the help and the bitmap.

14-02-2005 at 09:03 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB General : Making the mouse cursor disappear/reappear
Previous Topic (How do i disable ALT-F4)Next Topic (Editing FlexGrid) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder