Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / September 2007

Tip: Looking for answers? Try searching our database.

Detecting signals from multiple mouse-based hardware

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Przemek M. Zawada - 09 Sep 2007 17:43 GMT
Dear Group,

I have got two mice connected to one PC (notebook).
In example I click parallel left button on mouse A and left button on
mouse B. Is it possible, programmatically detect which on which mouse
which button has been clicked?

Mainly, the thing what I'm doing is to connect to 'scroll button
click' a Halls sensor (contactron), one for each mouse, and I need to
count down the sensor signals. The simplest way is to fetch the mouse
events with C#, but what would happen in case of two mice?

Those mice are connected via USB port - no way to do it via RS232
port. Shall I detect a hardware on USB port and then read data from
it? In fact I'm interested in reading signal from exactly one button
for each of mice's. I cannot define that one sensor is left button and
another sensor is right button, because the third mouse (notebook
touchpad) is used normally, so I cannot bind 'common-use buttons'. Any
ideas?

Thank you for all answers!

All the best,
Przemek M. Zawada
Peter Duniho - 09 Sep 2007 18:26 GMT
> I have got two mice connected to one PC (notebook).
> In example I click parallel left button on mouse A and left button on
> mouse B. Is it possible, programmatically detect which on which mouse
> which button has been clicked?

I don't think this is possible using the .NET classes directly.  I'm not
even sure it's possible in the regular unmanaged Win32 API.  You will
probably have to use DirectInput, which allows for complete enumeration
and management of all input devices.

Pete

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.