2

I want to use a trackball in my C# .NET application. But I do not want the trackball to be used by Windows as a mouse. When I connect both a trackball and a mouse the are both given control of the cursor.

So there are essentially two questions:

  1. How can the trackball be removed/disabled/coaxed into giving up control of the cursor?

  2. After doing this how can I access the trackball movement information from my C# .NET application.

Thank you!!

Ash

PS: I specifically want trackball support, but am hoping that joystick support will be similar as I may expand to this functionality in the future. Since the joystick does not default to having control of the cursor I can see how this may be different...perhaps easier?

  • Interesting question! I would default to "can't be done", but maybe someone with a better understanding of HID devices in windows, USB, drivers etc can come up with a better answer! – Tao May 18 '11 at 21:08

2 Answers2

1

I would think you need to install a special driver that would not identify the mouse as a mouse, but as an input device that streams the movement.

The windows driver kit might help. It says they have a HID device example.

zsalzbank
  • 9,685
  • 1
  • 26
  • 39
  • Another thought is to use DirectInput to single out input from the Trackball... but I don't know if you can prevent the trackball from moving the cursor if you take that approach (I've not used DI personally). – Qwertie May 18 '11 at 22:53
0

I highly recommend Edward Tse's SDG Toolkit (Single Desktop Groupware Toolkit). I used it several years ago for an application that required multiple mice and monitors.

You can also get the C# source code: http://grouplab.cpsc.ucalgary.ca/cookbook/index.php/Toolkits/SDGSourceCode

Gabe
  • 84,912
  • 12
  • 139
  • 238