5

I'm trying to figure out how to programmatically tell if a Windows 7 machine has touch enabled. Are there any touch API's (managed or unmanaged) that can help me achieve this? Or perhaps something in the registry I can check?

Pål Brattberg
  • 4,568
  • 29
  • 40
user577240
  • 460
  • 1
  • 7
  • 14

1 Answers1

10

Use GetSystemMetrics to look for SM_MAXIMUMTOUCHES settings.

Nonzero if there are digitizers in the system; otherwise, 0.

SM_MAXIMUMTOUCHES returns the aggregate maximum of the maximum number of contacts supported by every digitizer in the system. If the system has only single-touch digitizers, the return value is 1. If the system has multi-touch digitizers, the return value is the number of simultaneous contacts the hardware can provide.

Pål Brattberg
  • 4,568
  • 29
  • 40
  • Here's how to use GetSystemMetrics in C#: http://stackoverflow.com/questions/14725781/getsystemmetrics-returns-different-results-for-net-4-5-net-4-0 – patrickbadley Apr 28 '15 at 21:06