I want to disable the functionality of using a mouse when using a touch screen monitor in vb.net. The reason why I ask is because I want to limit users to only one option. is there a way I can code this in vb.net 2010.
Asked
Active
Viewed 1,307 times
0
-
A touch screen just emulates a mouse click so that won't limit what they can click either. Are you sure you don't want to just change the mouse icon to something that can't be seen? – Matt Wilko Nov 29 '11 at 12:11
-
A programmer cannot compete with a pair of scissors. – Hans Passant Dec 28 '11 at 21:13
2 Answers
1
I don't know of a purely .NET way, but you can execute devcon.exe
to find classes of devices (USB HID Mice for example) and disable them.
http://support.microsoft.com/kb/311272
Edit: There is a similar question that shows a .NET example.
See also: http://www.codeproject.com/KB/cs/HardwareHelper.aspx
-1
Just unplug the mouse.
If, for some reason, you can't do that, just disable it in Device Manager.
No code needed.

SLaks
- 868,454
- 176
- 1,908
- 1,964
-
-
@Brad: Yes, but I'm guessing he doesn't need it. Also, I don't know how to do that. :) – SLaks Nov 28 '11 at 22:11
-
Ha, I'm sure you're correct, but this doesn't really answer the question, does it? – Brad Nov 28 '11 at 22:14
-
just wanted to know, if i programmatically disable the mouse in the code, this wouldnt affect the way the touch screen monitor works right? – Calvin Nov 29 '11 at 01:30
-
@Calvin: That depends how you do it. If you disable the physical mouse device (a HID), the touch screen shouldn't be affected. – SLaks Nov 29 '11 at 01:35
-
@SLaks: can you point me to the right direction on how i can code this in vb.net? – Calvin Nov 29 '11 at 01:46