Show up the On Screen keyboard if the user sets the focus on a textfield. WPF with .Net 4 Client profile

五迷三道 提交于 2019-12-07 04:01:19

问题


For my full screen WPF application, I need to show up the Windows 7 onscreen keyboard, if a user sets the focus on a textfield.

There's no hard keyboard for the panel, just a mouse device to interact with it. In this case I need a onscreen keyboard to fill up the textfields.

The WPF-application is written in C# .Net on the .Net Framework 4.0 Client profile.

Thanks for reply Andi


回答1:


You can wire up following code to TextBox's GotKeyboardFocus or GotFocus event

Process.Start("systempath..\\osk.exe");


来源:https://stackoverflow.com/questions/5669854/show-up-the-on-screen-keyboard-if-the-user-sets-the-focus-on-a-textfield-wpf-wi

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