How to make win10 open a virtual tablet keyboard?

I have an application that needs a virtual keyboard. But, when I click on some of my TextBox es, they do not display the virtual keyboard. I tried using this:

 System.Diagnostics.Process.Start("osk.exe"); 

But this opens up another keyboard that does not close after the TextBox has no focus. How to make win10 open a virtual tablet keyboard?

To make sure:
It works on win10 touch screen pc. When I turn on tablet mode, the virtual keyboard appears on some TextBox es and not on others. So I want to make the keyboard show.

EDIT: Since then, I have found a way to show the "virtual tablet keyboard", however I would like to do this using the InputPane class. Can someone provide me some sample code to get me started?

Code to open it without using the InputPane class:

 System.Diagnostics.Process.Start("TabTip.exe"); 
+6
source share
1 answer

One thing. InputPane, you cannot use in WinForms, InputPane is a UWP element.

I ran this code ... And Works!

  string progFiles = @"C:\Program Files\Common Files\Microsoft Shared\ink"; string keyboardPath = Path.Combine(progFiles, "TabTip.exe"); Process.Start(keyboardPath); 

But I had to add the key value (MANUALLY) in my regedit to HKEY_CURRENT_USER\SOFTWARE\Microsoft\TabletTip inside the key - this is a folder named 1.7 (this may change in the future by Microsoft) and add a 32-bit DWORD value called EnableDesktopModeAutoInvoke with a value of 1 . This means TRUE. It should look like this:

REGEDIT

You can add the key programmatically, I think you need administrator privileges. I tried to add the key programmatically, but it doesnโ€™t work, it doubles the record without any effect (BE CAREFUL);

AND CONSULTATIONS:

Consider making a traffic jam for each process you create. I believe that you will use this when the focus of the request is a text field (any input method). be sure to stop the process when the component loses focus.

hope this help.

enter image description here

+2
source

All Articles