Can FindWindow find hidden windows?

First of all, let’s answer the question. Yes, FindWindow can find any Window that exists, regarless of the style bits or state, provided it is given enough information to identify the Window. This often is as simple as the Window’s caption (or Text property in C#).

In a recent newsgroup thread, a user argues vehemently that calling the FindWindow API can’t find a window that has been hidden (specifically in C# using the Hide() method).  Since my word is not enough to convince him, and since he apparently won’t show the code that’s failing, I decided to put it to rest with a test application (download the test app here).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s