Hi everyone! i have a question if someone know how can i check with a VB application if another programs window is minimized or maximized?
example i would make a simple VB app that could while running check with a timer if "MS Paint" for example was maximized and check for changes to when ever it got minimzes to the taskbar.

is this possible? i tryied to find answer many places on the net but still nothing that does this.

thank you for any help on this!

Recommended Answers

All 2 Replies

The only way I know of to do this is calling the Win32 API manually. First you get the process ID by iterating through the running processes, compare the process EXE file name until you find the one you want, then get the hWnd and send it a message asking for it's state.

Here's a link that might help with iterating through the running processes:
http://support.microsoft.com/kb/187913
As you can see (assuming you look at the link) this is not for the faint of heart. I recommend you get a book if you really want to get into doing things with the Windows API.

Hi there! dident check back untill now and soo thanks for the tip there, i know some of this, the part how to get recive the windows iterating thruegh the windows, just part what to do ones i have that since i know the name of it aswell the window tittle i mean.

ok will see if i can try figure it out.

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.