I would like to be able to programmatically emulate the keyboard
navigation for dialog boxes.
I have a custom hardware device with a keypad that I would like to use for
dialog box navigation.
I know about Focus(), but I’d rather do something that automatically
respected the tab order. By emulating the keyboard navigation I don’t
have to worry about re-inventing complex behavior for each type of
control.
Does anyone know how to do this?
Thanks!
You could use P/Invoke to call the Windows API function keybd_event to simulate pressing the Tab key.
Bonus: you can use your device to enter tabs into a text editor as well! 😉