jhebbel
Member
- Joined
- Dec 21, 2011
- Messages
- 5
- Programming Experience
- 5-10
Like the title says im trying to find the top most window other than my form or its parent form...
Background:
Im writing software for a TS-MFD (touch screen - Multi function display), it has a docked menu bar at the bottom with the option to pull up an onscreen keyboard. Now the keyboard ive written and works well but the only drawback is i need to specify what window to send the keys too, be it inside my own application or a 3rd party app such as notepad. I believe the answer lies an recursively looping through GetForegroundWindow() from user32.dll and ignoring "Keyboard" and "MenuBar", but I dont know how to advance to the next top most window, i only know how to get the top window...
so my window order is likely Keyboard,Menubar,(then the window im trying to grab)
working in vs2010 and im also trying to keep this .net 2 if i can
Background:
Im writing software for a TS-MFD (touch screen - Multi function display), it has a docked menu bar at the bottom with the option to pull up an onscreen keyboard. Now the keyboard ive written and works well but the only drawback is i need to specify what window to send the keys too, be it inside my own application or a 3rd party app such as notepad. I believe the answer lies an recursively looping through GetForegroundWindow() from user32.dll and ignoring "Keyboard" and "MenuBar", but I dont know how to advance to the next top most window, i only know how to get the top window...
so my window order is likely Keyboard,Menubar,(then the window im trying to grab)
working in vs2010 and im also trying to keep this .net 2 if i can