开发者

Compact Framework - Mapping Keyboard key to button click event

I am working on a wizard for a compact framework application. The wizard has a next and previous button at the bottom left and bottom right of the screen. How would I go about binding a keypad buttons to fire the next and previous buttons. The device that will be running the application has keypad buttons the sit directly below the next and previous buttons and I want to intercept the key events fro开发者_开发知识库m these buttons and trigger the next and previous button click in my app.


You don't mention if it's a custom Windows CE device or a more "standard" Windows Mobile device.

  • For a Windows CE device, the key can likely be intercepted with combinations of the form's KeyPreview property, the form's KeyDown event, the HardwareButtons from Microsoft.WindowsCE.Forms and the native AllKeys function.
  • For a Windows Mobile device, I'm pretty sure you need to install a keyboard hook to catch the two buttons below the screen...
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜