How do I check if any window is maximized? I've got a program which sends keystrokes to that window but the problem is it will send keystrokes to any application that is running on my PC at the moment, so I wanted to prevent this by making it only send the keystrokes if that program is running.

Can anyone help? Maybe use notepad.exe as a example, I've got functions to get handles of any program too so you don't need to add that in, just comment :D.

If you have the handle you can send a message to maximize it, but I do not know of a message to retrieve if a window is maximized.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.