How can I tell if a given hWnd is still valid?
Posted
by Ian P
on Stack Overflow
See other posts from Stack Overflow
or by Ian P
Published on 2010-04-29T16:24:06Z
Indexed on
2010/04/29
16:27 UTC
Read the original article
Hit count: 300
Please forgive my ignorance, I'm completely new when it comes to winforms programming.
I'm using a third-party class that spawns an instance of Internet Explorer. This class has a property, hWnd, that returns the hWnd of the process.
Later on down the line, I may want to reuse the instance of the application if it still exists, so I need to tell my helper class to attach to it. Prior to doing that, I'd like to know if the given hWnd is still valid, otherwise I'll spawn another instance.
How can I do this in C# & .NET 3.5?
Thanks for the help and I apologize if my winforms nomenclature is all wacky.. haha
Ian
© Stack Overflow or respective owner