Skip to main content
8 events
when toggle format what by license comment
Jan 25, 2014 at 19:04 comment added nevelis +1 - FindWindow was the answer in my case too. MainWindowHandle worked fine, until I would hide the window on minimize & made a TrayIcon visible instead. In this case, MainWindowHandle returned the handle of the TrayIcon... Gotta love that beautiful win32 API, huh? :D
Nov 29, 2012 at 17:52 comment added KeithS Yes, a P/Invoke call to FindWindow in the same WinAPI dll as ShowWindow.
Nov 29, 2012 at 17:34 comment added MoonKnight +1 @KeithS what find window method are you using here. I take it that you are talking about an Interop method?
Feb 9, 2012 at 15:44 vote accept KeithS
Feb 1, 2012 at 22:35 comment added KeithS Good info. Apparently I fell into the trap. Anyway, FindWindow, given that you know the title of the window you want, gives the right answer.
Feb 1, 2012 at 19:10 comment added Deanna There is no "Main window" concept, the author of that object just assumed that the first would be it. Further more, MSDN says "Brings the thread that created the specified window into the foreground"
Feb 1, 2012 at 18:06 history edited KeithS CC BY-SA 3.0
added 26 characters in body
Feb 1, 2012 at 17:54 history answered KeithS CC BY-SA 3.0