How to disable the little touch-keyboard on Windows edit controls

五迷三道 提交于 2019-12-01 10:03:27

问题


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


回答1:


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; 



回答2:


Disable the "Touch Keyboard and Handwriting Panel Service"



来源:https://stackoverflow.com/questions/1136153/how-to-disable-the-little-touch-keyboard-on-windows-edit-controls

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!