Mouse hides while typing -- Forcibly show it

  • Thread starter Thread starter Rajneesh Narain
  • Start date Start date
R

Rajneesh Narain

Hi,

I have a ComboBox in a Windows app (.net2.0). And when users start typing
into it, the dropdown populates itself from a webservice and gives relevant
options under it... But the mouse hides itself, os its very hard to know what
you are selecting.

The reason for mouse hiding itself is because in Control Panel >> Mouse >>
Pointer Options >> [x]Hide pointer while typing is checked.

If I uncheck it, it works fine, and I can see the mouse. But I can't tell
all my users to uncheck it while installing my product.

I tried looking at the registry changes (regmon.exe) that happen when it is
unchecked, but didn't figure out what reg key was responsioble for this
change... Is there any API call that might help me in this situation.

Kindly Suggest.

Thanks!
 
Rajneesh,

I would recommend not doing anything. It's not the place of your app to
override the settings of the user or the machine. Basically, they have
selected that they don't want the pointer when they are typing, so respect
it.
 
Hello,
But the mouse hides itself, os its very hard to know what you are
selecting.
Is there any API call that might help me in this situation.

I'm on the same lines as Nicholas, that this setting is a system-wide
setting, and you should respect the user's preference, and not set it
yourself. However, it could be argued that not so many users are aware of
the setting, and know where to change it.

That said, I can think of certain situations where you might want to help
the user change this setting, for example by providing help text, or making
it a hint during application install, for example.

But yes, you can change this setting programmatically. The features is
called "mouse vanish" internally, and you can use the SystemParametersInfo
Win32 API function with the SPI_SETMOUSEVANISH flag to set this option on or
off. But be warned: you must not do this without the consent of the user, as
this affects all applications, not just yours.

See www.pinvoke.net for the function declaration if you need to call this
function directly from .NET code.

Good luck!

--
Regards,

Mr. Jani Järvinen
C# MVP
Vantaa, Finland
(e-mail address removed)
http://www.saunalahti.fi/janij/
 
Thanks Nicholas, I agree user preferences should be respected, and totally
agree with the way we can advise the users about the possible options as said
by Jani.

Thanks Jani, I will try use those API calls.

I regret replying soo late, got busy in another project.

Thanks!
 
Back
Top