如何禁用 Windows 编辑控件上的小触摸键盘

发布于 2024-07-27 01:36:39 字数 177 浏览 1 评论 0原文

在支持平板电脑的 Windows 版本中,当编辑控件获得焦点时,会出现一个小键盘图标。 如果您触摸它,触摸键盘就会弹出。

有办法禁用这个吗? 如果你有自己的触摸键盘,那就相当不方便了。

我想对代码中的某些编辑控件禁用它,即。 我不是在寻找 Windows 设置。

吉尔

In a windows version with tablet support, a small keyboard icon appears when an edit control gets focus. If you touch it the touch keyboard pops up.

Is there a way to disable this? It's rather inconvenient if you have your own touch keyboard.

I want to disable it for certain edit controls in code, ie. I'm not looking for a Windows setting.

Giel

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

忆伤 2024-08-03 01:36:39

好吧,我想迟到的答案总比没有答案好,所以它来了:

您可以为您的应用程序禁用 Windows 屏幕键盘。
为此,请启动 Regedit 并导航至注册表项 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\TabletTIP\DisableInPlace]。 在那里您创建一个新的字符串值,将其名称设置为完整的应用程序路径(例如“C:\Progam Files\My App\MyApp.exe”)并将其值设置为“1”。

编辑:最近我不得不重新考虑我的解决方案...通过设置注册表值,您可以禁用整个应用程序的屏幕键盘。 但是,如果您需要一个键盘来实现程序中某些很少使用的功能,并且碰巧忘记包含屏幕键盘,则必须通过 SDK / API 控制 Windows TextInputPanel。 请参阅此链接:以编程方式禁用输入面板
使用 PenInputPanel 进行手写,使用 TextInputPanel 进行屏幕键盘。

对于所有那些 Delphi 程序员:导入类型库“Microsoft PenInputPanel”并修复导入的 *_TLB.pas 中的 BUG:更改 IPenInputPanel 的两个方法的参数类型:

function Get_AttachedEditWindow: SYSINT; safecall;
procedure Set_AttachedEditWindow(AttachedEditWindow: SYSINT); safecall; 

Well, I guess a late answer is better than no answer, so here it comes:

You can disable the Windows onscreen-keyboard for your application.
To do so, start Regedit and navigate to the Key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\TabletTIP\DisableInPlace]. There you create a new String Value, set its name to the full application Path (e.g. "C:\Progam Files\My App\MyApp.exe") and set its value to "1".

Edit: Recently I had to rethink my solution... By setting the Registry value, you disable the onscreen-keyboard for the whole application. But should you need a keyboard for some seldom used function of your program and just happend to forget including an onscreen-keyboard, you have to control the Windows TextInputPanel via SDK / API. See this link: Disabling the Input Panel Programmatically.
Use the PenInputPanel for handwriting and the TextInputPanel for an onscreen-keyboard.

For all those Delphi programmers out there: import the Type Library "Microsoft PenInputPanel" and FIX A BUG in the imported *_TLB.pas: change the parameter type of the two methods of IPenInputPanel:

function Get_AttachedEditWindow: SYSINT; safecall;
procedure Set_AttachedEditWindow(AttachedEditWindow: SYSINT); safecall; 
若沐 2024-08-03 01:36:39

禁用“触摸键盘和手写面板服务”

Disable the "Touch Keyboard and Handwriting Panel Service"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文