我如何触发或SU preSS的Windows虚拟键盘显示器 [英] How do I trigger or supress the display of Windows Virtual Keyboard

查看:178
本文介绍了我如何触发或SU preSS的Windows虚拟键盘显示器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在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

这篇关于我如何触发或SU preSS的Windows虚拟键盘显示器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆