mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-10-01 01:27:33 +13:00
19 lines
449 B
C#
19 lines
449 B
C#
|
using System.Runtime.InteropServices;
|
|||
|
|
|||
|
namespace SystemTrayMenu.DllImports
|
|||
|
{
|
|||
|
public static partial class NativeMethods
|
|||
|
{
|
|||
|
[DllImport("user32.dll")]
|
|||
|
private static extern int GetSystemMetrics(int nIndex);
|
|||
|
|
|||
|
public static bool IsTouchEnabled()
|
|||
|
{
|
|||
|
const int MAXTOUCHES_INDEX = 95;
|
|||
|
int maxTouches = GetSystemMetrics(MAXTOUCHES_INDEX);
|
|||
|
|
|||
|
return maxTouches > 0;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|