Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Incorporating the Windows 7 onscreen keyboard into a WPF app

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. To be able to use the keyboard on an XP machine that will have .NET 3.5 sp1 installed on it.
  2. To be able to hide the native keyboard on Windows 7, because I've already incorporated the touchscreen keyboard in my UI and so I don't need another one cluttering up the 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.

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

EDIT: 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.

like image 697
mmr Avatar asked Jul 22 '09 20:07

mmr


1 Answers

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

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

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

like image 86
Bob King Avatar answered Sep 24 '22 11:09

Bob King