Thanks Johnwm!
That is pretty neat, except I copied and pasted the code to my form, and I added this bit:
Me.Print "Mouse present= " + Str$(GetSystemMetric_
s(SM_MOUSEPRESENT))
The mousepresent value doesnt change.
I am using a USB mouse. I start the code by pressing F5 when I have the mouse unplugged.
The only thing that changes is number of buttons. 3 if mouse plugged in, 2 if not.
Why do I want to do this?
I am throwing together a home arcade machine (80's style).
I would like to run the game "front end" on bootup, unless the mouse is plugged in, then it boots up on windows, for servicing.
Thanks for your help, it would be nice if this could be done from a dos batch file, but i dont know how to do it. (I will be using win98 on the machine.)
I thought about writing a small vb6 program that would run on boot-up and do the mouse check.
Any arcade enthusiasts out there?