[英]How do I detect if a device is touch-enabled in c# for a WinForms app on Windows Embedded Standard 7
Below code works fine on Windows 7 but not on Windows Embedded Standard 7 : 下面的代码在Windows 7上运行正常,但在Windows Embedded Standard 7上运行不正常:
[System.Runtime.InteropServices.DllImport("user32.dll")]
public static extern int GetSystemMetrics(int nIndex);
public static bool isTouchEnabled()
{
int MAXTOUCHES_INDEX = 0x95;
int maxTouches = GetSystemMetrics(MAXTOUCHES_INDEX);
return maxTouches > 0;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.