show cursor with mouse, hide cursor without mouse

J

jbcseri

I would like to have the mouse cursor to be present only when a USB
mouse is plugged in and have it disappear when the mouse is unplugged.
So, with no mouse plugged into the system, the cursor is invisible or
not present; when a mouse is plugged into the system, the cursor
appears.

I've already read through the many other solutions to hiding, or
eliminating, the mouse cursor and have been able to implement them,
but the desired solution is to have the cursor AUTOMATICALLY appear
when a USB mouse is plugged in, and then have it AUTOMATICALLY
disappear when the USB mouse is not plugged in. I'm looking for a non-
programmatic solution too. Is there some setting that can make this
happen? From what I've read, this behavior used to occur without any
additional configuration effort in Windows 2000 and someone even said
it happened in XP SP1. I'm planning to build an XPe SP1 image to see
if the behavior occurs, and then upgrade the configuration to SP2,
rebuild, and test. I'm hoping that this is not a feature that was
eliminated between SP1 and SP2.
 
J

jbcseri

If the solution that I'm seeking is not built into the operating
system, can someone (preferably from Microsoft) confirm it? I've seen
a couple other posts from people seeking to get the same behavior that
I'm seeking, but no solutions have been posted. I have not found any
documentation about this anywhere.

ANY feedback would be appreciated. Thanks!
 
K

KM

I am not going to confirm there is no solution built-in but I may think this typical embedded scenario is unlikely covered by XP Pro
and therefore not existing in XPe.
I will leave the final confirmation to Microsoft folks, though.

I know you have asked for a non-API way but I don't know such so I will propose the one that will require some (minimal) programming
skills.
You can write a simple agent app that will be detecting the mouse presence in the system. If not present, it should hide the cursor
the same way you are doing that now. How to check if the mouse is present? Try using the GetSystemMetrics(SM_MOUSEPRESENT) API. Not
sure if it is going to work properly on the multiple USB mouse plug-ins but worth to check out and test.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top