Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Have you tried making the window visible before trying to restore it, with a line like this: ShowWindow(handle, SW_SHOW);?
    – Brian Snow
    Commented Feb 1, 2012 at 17:13
  • I had tried a lot of permutations including calling ShowWindow first. The problem was that the thread provided by Process.MainWindowHandle was not the thread of the "main window".
    – KeithS
    Commented Feb 9, 2012 at 15:46