473,372 Members | 953 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,372 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 2347
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.