我如何触发或SU preSS的Windows虚拟键盘显示器显示器、键盘、SU、preSS

由网友(眷恋你一生一世)分享简介:在WPF我有一个屏幕用于登录其中有一个文本框,输入用户名和密码一个密码箱。我的理想需要prevent屏幕上的键盘无法显示,所以我可以在应用程序的最佳地点使用自定义键盘。如果做不到这一点,我需要以某种方式强制屏幕键盘以显示密码框。In WPF I have a screen for login which has a...

在WPF我有一个屏幕用于登录其中有一个文本框,输入用户名和密码一个密码箱。我的理想需要prevent屏幕上的键盘无法显示,所以我可以在应用程序的最佳地点使用自定义键盘。如果做不到这一点,我需要以某种方式强制屏幕键盘以显示密码框。

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.

我已经找到了Microsoft.Ink.TextInput.TextInputPanel似乎有大部分在.NET 3.5中这一功能,但我找不到在.NET 4.0中的等价

I've found the Microsoft.Ink.TextInput.TextInputPanel seems to have most of this functionality in .net 3.5, but I can't find an equivalent in .net 4.0

P.S。对其他形式的任何文本框需要工作正常,并于同平板电脑等应用的理想应该也不会受到影响,所以我不舒服的使用注册表项河畔pressing的提示。

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.

推荐答案

您不能显示/隐藏虚拟键盘从.NET托管code。然而,由于虚拟键盘是一个标准的Windows应用程序,你可以简单地显示/隐藏它通过启动相应的程序。

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
阅读全文

相关推荐

最新文章