Is there an API that can control the opening and closing of the tablet mode?
I can determine the current tablet mode status by monitoring the registry's SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell
property value, but even if the code changes this value, you can't actually turn off/on the Windows tablet mode.
In the WPF project, I want to close/open the tablet mode when I enter the app. I tried to directly modify the value in the registry, but it did not show the effect on the OS.
Registry.SetValue("HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ImmersiveShell","TabletMode", 0);
SendMessageTimeout(new IntPtr(HWND_BROADCAST), WM_SETTINGCHANGE, IntPtr.Zero, IntPtr.Zero, SendMessageTimeoutFlags.SMTO_NORMAL,1000, out result1);