Turning mouse vanish on

Just starting out? Need help? Post your questions and find answers here.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Turning mouse vanish on

Post by PB »

According to MSDN, I should be able to turn mouse vanish on for Windows XP
with the following code. (Mouse vanish = the mouse hides when typing, and
reappears when the mouse is moved).

Code: Select all

Debug SystemParametersInfo_(#SPI_SETMOUSEVANISH,0,#True,0)
If I run this, it returns 1, which means it worked... but it doesn't. If I type, the
mouse is still present instead of disappearing. Any ideas why? MSDN says it's
only Windows 2000/NT and Windows 98/95 that doesn't support this command,
and I'm running XP Pro with SP2. At the moment I've been using my own code
to hide the mouse while typing, but man, I'd love to use just one line like this!

MSDN online article about it (not the article I used):
http://msdn2.microsoft.com/en-us/library/ms724947.aspx
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Post by tinman »

That only describes setting the mouse vanish setting system-wide. It doesn't necessarily perform the mouse hiding, which I would have thought would be up to the application to check the setting and hide the mouse itself.

I just tried setting the option using the control panel -> Mouse here and the only application I have found so far that obeys the mouse hiding is notepad. So it must be up to the application or control to perform.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

I see... well, that sucks then. :)

BTW, Notepad here hides the mouse even if this is set to 0, so go figure. :)
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

PB wrote:I see... well, that sucks then. :)

BTW, Notepad here hides the mouse even if this is set to 0, so go figure. :)
Yes, I noticed this before as well. The whole setting seems to be royally broken - when I want it off I can't make it go off, when I want it on I can't make it go on!
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> The whole setting seems to be royally broken

Yep, that's what I thought. I'm glad I'm not the only one! I always thought it was
just my PC and/or mouse that I was using (Logitech). Good to know others have
problems with it, too.
Post Reply