I have a Surface Pro that I use for sketching with my stylus. I want to be able to quickly enable/disable tablet mode without going into Device Manager.
I've been searching for ways to do this: by disabling drivers, disabling by HID but everything I've found seems overly complicated for what I need. I'm creating just a form with a CheckBox. What's the simplest way to achieve this?
You could try something like setting the Registry Key to 0
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell]
"TabletMode"=dword:00000000
If TabletMode = 1 then it'll be enabled.
RegistryKey myKey = Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell", true);
if(myKey != null)
{
myKey.SetValue("TabletMode", "0", RegistryValueKind.dWord);
myKey.Close();
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.