472,139 Members | 1,437 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,139 software developers and data experts.

how to detect mouse presence ?

Hi to all

I have to detect the mouse presence and disconection if occurs to give
alerts. I'm using VB .NET, if somebody can help i'll apretiate it.
Nov 20 '05 #1
6 2288
You can use System.Windows.Forms.SystemInformation.MousePresen t to check for the presence of the mouse

"Perquiaga" wrote:
Hi to all

I have to detect the mouse presence and disconection if occurs to give
alerts. I'm using VB .NET, if somebody can help i'll apretiate it.

Nov 20 '05 #2
Using System.Windows.Forms.SystemInformation.MousePresen t I get a true or
false saying the mouse is installed or not, but it does not detect it. If i
unplugg the mouse it keeps telling its installed.

"Anand M [MVP]" <Anand M [MVP]@discussions.microsoft.com> wrote in message
news:92**********************************@microsof t.com...
You can use System.Windows.Forms.SystemInformation.MousePresen t to check for the presence of the mouse
"Perquiaga" wrote:
Hi to all

I have to detect the mouse presence and disconection if occurs to give
alerts. I'm using VB .NET, if somebody can help i'll apretiate it.

Nov 20 '05 #3
That I would assume is because for the OS, the mouse is still available. I think if finds out the mouse is not there only when you reboot. I suspect this may not be the case for a USB mouse, as the OS should be able to detect unplugging of a USB device.

Rgds,
Anand M
http://www.dotnetindia.com

"Perquiaga" wrote:
Using System.Windows.Forms.SystemInformation.MousePresen t I get a true or
false saying the mouse is installed or not, but it does not detect it. If i
unplugg the mouse it keeps telling its installed.

"Anand M [MVP]" <Anand M [MVP]@discussions.microsoft.com> wrote in message
news:92**********************************@microsof t.com...
You can use System.Windows.Forms.SystemInformation.MousePresen t to check

for the presence of the mouse

"Perquiaga" wrote:
Hi to all

I have to detect the mouse presence and disconection if occurs to give
alerts. I'm using VB .NET, if somebody can help i'll apretiate it.


Nov 20 '05 #4
"Perquiaga" <perquiaga> schrieb
Using System.Windows.Forms.SystemInformation.MousePresen t I get a
true or false saying the mouse is installed or not, but it does not
detect it. If i unplugg the mouse it keeps telling its installed.


That's a low-level issue not handled by VB.Net or the .Net Framework. You
might find something in the MSDN library.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #5
Hi Perquiaga,

I think that the mouse can only be tested if it is working with tracking the
mouse move event.

However just an idea.

Cor
Nov 20 '05 #6
Any idea for re detect devices ?
Maybe could refresh the mouse status

"Anand M [MVP]" <Anand M [MVP]@discussions.microsoft.com> wrote in message
news:92**********************************@microsof t.com...
You can use System.Windows.Forms.SystemInformation.MousePresen t to check for the presence of the mouse
"Perquiaga" wrote:
Hi to all

I have to detect the mouse presence and disconection if occurs to give
alerts. I'm using VB .NET, if somebody can help i'll apretiate it.

Nov 20 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Michiel | last post: by
2 posts views Thread by Sam | last post: by
10 posts views Thread by Phoe6 | last post: by
5 posts views Thread by foolsbar | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.