I am trying to enable/disable touch capability on Windows 7 or 8 for my WPF drawing application.
As far as I searched, the link How to turn off all touch input at application, window or control level? gives a right location of the registry for touch capability status.
However, it did not be affected on-the-fly because windows system may not be acknowledged the changes.
In my assumption, User32.dll refresh with SystemParametersInfo is required to make changes without reboot. But hard to figure out how to do that because I don't know which SPI_something is related to WISP.
Is there another method or could you help me to make it happen?
The sample code is as below (pretty similar to above StackOverflow referenced link)
RegistryKey regKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Wisp\Touch", true);
if (regKey != null)
{
regKey.SetValue("TouchGate", 0x00000000); // Turn off touch.
regKey.Close();
// NOTIFY REGISTRY CHANGES TO WINDOWS
}