How do I trigger or supress the display of Windows Virtual Keyboard
In WPF I have a screen for login which has a textbox for username and a password box for password. I ideally need to prevent the on-screen keyboard from displaying so I can use a custom keyboard in the perfect location in the app. Failing that I need to somehow force the on-screen keyboard to display for the password box.
I've found the Microsoft.Ink.TextInput.TextInputPanel 开发者_JAVA技巧seems to have most of this functionality in .net 3.5, but I can't find an equivalent in .net 4.0
P.S. Any textboxes on other forms need to work as normal, and other applications on the same tablet should ideally also be unaffected, so I'm uncomfortable with surpressing the TIP using a registry key.
You cannot show / hide the virtual keyboard from .Net managed code. However, as the virtual keyboard is just a standard windows application you can simply show / hide it by starting the appropriate Process.
var virtualKeyboard = new System.Diagnostics.Process();
virtualKeyboard = System.Diagnostics.Process.Start("osk.exe"); // open
virtualKeyboard.Kill(); // close
精彩评论