here is a toughy....
i'm looking for a snippit of code that can do this for me...
i want my program to know when the mouse has been unpluged. that's it... and possibly when it has been pluged in again..
any thoughts...i can't figure it out...
Printable View
here is a toughy....
i'm looking for a snippit of code that can do this for me...
i want my program to know when the mouse has been unpluged. that's it... and possibly when it has been pluged in again..
any thoughts...i can't figure it out...
I have a class that I got from Planet Source Code, take a look at the MousePresent() function, I'm not sure if it's what you want because I haven't used the class my self:D
:mad: :mad: I just checked Total VB Source book (code bank program), that class is from Total VB Source Book and for some reason someone has changed it and put it on Planet Source Code
nope that looks like it has mainly all the mouse window functions in it. what i am looking for is a program that looks at the mouse port i guess (ps2) and if there is no mouse there then it lets me know.
any ideas?
what does the mousePresent function do then? just tells you if it is installed or not?
' Returns True if a mouse is installed.
yup
it returns a true if the mouse is installed.
Here's the test program you asked (it's zip, I can send the exe if you cant open it right now)
wel, I tried it myself and it didnt work they way you wanted it to. I didnt test it this way, but it might work if the windows is started without a mouse:rolleyes:
there should be a trick or something to figure that out