将 Windows 7 屏幕键盘合并到 WPF 应用程序中 [英] Incorporating the Windows 7 onscreen keyboard into a WPF app

查看:16
本文介绍了将 Windows 7 屏幕键盘合并到 WPF 应用程序中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows 7 为触摸屏提供了非常出色的屏幕键盘程序/控件.我有一个最初为 XP 编写并将部署在 XP 上的触摸屏应用程序.是否可以将此键盘直接合并到我的应用程序中,而不是使用自定义控件?我找不到有关它的程序化信息,因此任何链接都会非常有帮助.具体来说,我需要:

Windows 7 has a really nice onscreen keyboard program/control for touchscreens. I have a touchscreen app that was originally written for, and will be deployed on, XP. Is it possible to incorporate this keyboard directly into my app, rather than me using a custom control? I can find no programmatic information about it, so any links would be very helpful. Specifically, I'd need:

  1. 能够在安装了 .NET 3.5 sp1 的 XP 计算机上使用键盘.
  2. 为了能够在 Windows 7 上隐藏本机键盘,因为我已经在我的 UI 中加入了触摸屏键盘,所以我不需要另一个弄乱 UI.

这款原生键盘有两个吸引人的方面.首先,它会自动本地化为客户的语言(尽管应用程序的其余部分需要修改),其次,它似乎不会受到触摸滞后"的影响,因为操作系统会试图弄清楚我是否"我在做一个手势,因为我显然是在键盘上打字.

This native keyboard has two attractive aspects to it. First off, it's automatically localized to the customer's language (though the rest of the app will need modification), and second off, it doesn't seem to suffer from 'touch lag' as the OS tries to figure out whether or not I'm doing a gesture, because I'm clearly typing on a keyboard.

该应用基于 WPF,这意味着可以轻松集成基于 Windows 7 的控件.

The app is WPF based, which should mean easy integration with Windows 7 based controls.

我真的很喜欢 XP 的东西,但这不是必需的.不过,在 Win7 中使用键盘的能力似乎应该是可能的,甚至是正确的方法.

I'd really like the XP thing, but it's not a requirement. The ability to use the keyboard in Win7, though, seems like it should be possible and even the right way to do it.

推荐答案

我发现的最好的东西是这样的:

The best thing I've found is this:

http://interactiveasp.net/blogs/natesstuff/archive/2008/10/01/ink-in-wpf-using-textinputpanel-for-text-input.aspx

它使用 WPF 的互操作,但似乎工作得很好.

It's using an interop out of WPF, but seems to work really well.

我希望我是真正写它的人,但我所做的只是找到它......

I wish I was the one who actually wrote it, but all I did was find it...

这篇关于将 Windows 7 屏幕键盘合并到 WPF 应用程序中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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