1

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?

RapsFan1981
  • 1,177
  • 3
  • 21
  • 61
  • Tablet mode isn't controlled by the device manager, it's a feature of the operating system. You should be looking at the SDK of the OS you are interested in (although I suspect it's at least Windows 8). The question is more likely to get an answer if it's tagged with the appropriate OS tag too. What operating system are you using? – Panagiotis Kanavos Sep 09 '15 at 14:16
  • I've retagged it. I'm working in Windows 10 – RapsFan1981 Sep 09 '15 at 16:04

1 Answers1

1

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();
   }
Sean
  • 442
  • 3
  • 6
  • 19