I have developed a Windows Forms application which is used on a touchscreen computer. Is it possible to display a keyboard when the user clicks on an input box (textbox)? And how can i do that ?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
Are you aware Windows has an on screen keyboard?
In Windows 7 it is All Programs > Accesseries > Ease Of Access > On Screen Keyboard.
You can write you own if you want, but I use the Windows one all the time when I do not feel like picking up the keyboard.
You can create a shortcut to it:
The location is %windir%\system32\osk.exe
So to launch it, in the TextBox_Click event (or whatever event you want to fire)
// Should work, I have not tested it. System.Diagnostics.Process.Start("c:\Windows\System32\osk.exe");
Just an update: On my machine at work I got an error trying to run that code (I built it as a test) and I had to copy the osk.exe to another directory and then launch it and it worked.
And this code worked.
I think you can use. System.Diagnostics.process.start
Your example show error for me:
I found this code which work fine without any errors:
I think you have to create a new form to ccreate the keyboard and launch this form in textbox click