如何以编程方式禁用平板电脑模式? [英] How can I disable Tablet Mode programmatically?

查看:47
本文介绍了如何以编程方式禁用平板电脑模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Surface Pro,用于用我的触控笔进行素描.我希望无需进入设备管理器即可快速启用/禁用平板电脑模式.

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.

我一直在寻找方法来做到这一点:通过禁用驱动程序,通过 HID 禁用,但我发现的一切对于我需要的东西来说似乎过于复杂.我正在创建一个带有复选框的表单.实现这一目标的最简单方法是什么?

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?

推荐答案

您可以尝试将注册表项设置为 0

You could try something like setting the Registry Key to 0

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell]
"TabletMode"=dword:00000000

如果 TabletMode = 1,那么它将被启用.

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();
   }

这篇关于如何以编程方式禁用平板电脑模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆