473,394 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 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 2348
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: selowan | last post by:
Hi, In VB6 Pro SP5, I have a form that contains an MSFlexGrid and a few other textboxes and comboboxes. I am using the technique from MSDN article Q241355, which describes how to tab and edit in...
0
by: Michiel | last post by:
Hello, Can anyone give me an idea of what classes/interfaces I could use when I want to detect the presence of a virtual machine (VMware, Virtual PC) on a user's system ? Both managed and...
2
by: Eitan | last post by:
Hello, I am creating a new window class based on CWnd. I am placing it on the View (CFormView). How can I get the notification or any other indication that the cursor/mouse is not on this...
2
by: Sam | last post by:
Hi, I can't figure out how to detect when my mouse cursor leaves a panel control. It should not trigger the event (or do anything) when the mouse leave the panel but still is over a control that...
10
by: Phoe6 | last post by:
Operating System: Windows Python version: 2.4 I have bookmarks.html and wumpus.c under my c: When I tried to check the presence of the bookmarks.html, I fail. >>>...
5
by: foolsbar | last post by:
Hi there, I'm trying to write a C# application that gets information from a machine such as operating system, memory, cpu etc. I'm using WMI for this, and it all seems to work fine apart from...
3
by: Iosy | last post by:
Hi all, I'm working in a application where I need to detect when the mouse is inactive outside my form. I mean, I want to detect if the mouse hasn't move in the last X seconds (2 por example)...
3
by: squeak | last post by:
Hi there, I'm new to VB2005 so its probably a very simple answer too! But i just can't think how to do it... Basically i need to detect mouse (and preferably keyboard) movement and kepresses...
2
by: Mohit | last post by:
Hi all, I am working on a windows application with a list view on a form. Now I wanted to show hand cursor when mouse is over list view item and default(arrow) cursor at other places. List...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.