.NET 4 - Determine the Number of Touch Points Available in Win 7

Windows 7 reports the number of access points available to the system under the properties of the computer - is there a way to get this information in .NET 4?

+5
source share
1 answer

Windows 7 provides this through GetSystemMetrics (SM_MAXIMUMTOUCHES). Since you need this in C #, you need to use P / Invoke:

[DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
static extern int GetSystemMetrics(int nIndex);

const int SM_MAXIMUMTOUCHES = 95;

int GetPointsAvailable()
{
    return GetSystemMetrics(SM_MAXIMUMTOUCHES);
}
+2
source

All Articles