How to catch a keystroke event on Windows Mobile 6?

I'm trying to catch keypress events on Windows Mobile 6.x using .NET 3.5. I have a form with buttons and other controls, and I need to catch when keys are pressed on the left, right, up and down. Unfortunately, with the approach described in MSDN:

http://msdn.microsoft.com/en-us/library/microsoft.windowsce.forms.hardwarekeys.aspx

all of these keys still move the cursor between the buttons on the form instead of triggering my event Form1_KeyDown (). (I have HardwareButtons with the corresponding Form1 control and HardwareKey).

Is there a way to catch these keypress events in C #?

+3
source share
2 answers

KeyPreview true, KeyDown .

+7

, 6 , HardwareButton HarwareKey ApplicationKey1 ApplicationKey6 .

+1

Source: https://habr.com/ru/post/1709940/


All Articles