0

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
        }
Community
  • 1
  • 1
Youngjae
  • 24,352
  • 18
  • 113
  • 198

1 Answers1

1

The current answer to the question How to turn off all touch input at application, window or control level? also gives a way to make Windows to re-read registry. See: the answer's internal static void Notify_SettingChange() method.

There is no documented SPI_* constant for touch disabling in SystemParametersInfo. Moreover all the SPI_ constants there are related to accessibility features - not general features like touch.

Community
  • 1
  • 1
farfareast
  • 2,179
  • 1
  • 23
  • 22
  • 1
    Thanks for your answer. I didn't realize the Notify_SettingChange is given from interop. Strangely, it doesn't works for me(Win8), but it works when I manually edit the registry value. – Youngjae Oct 08 '12 at 11:13