My application has several forms. What I want to do is to be able to switch between them (and only between them) using a pair of predefined keys (say Keys.A + Keys.B), just like ALT + TAB does for Windows (windows are shown in foreground). I tried getting the list of forms and then programmatically call Alt + Tab, but, as expected, this allows to switch between all open windows and not only the ones belonging to the application.
Thanks for any help!
You could implement
IMessageFilter
and add it to yourApplication
, then globally process the messages of your application.Here is how you do that.
You can find WindowsMessage enumeration here.