Processing minimized programs

I need help in working with minimized programs when using a custom / self-made explorer.exe file .. because if processed correctly, minimized programs will simply decrease to about 100x50px and remain on the screen. I designed a timer in C # to check the “sign” processes, list them with mainWindowHandler and move them off the screen using “MoveWindow”. To return them, I use the handler and the ShowWindow function, which works AWESOME .. but, as I said, it includes a constantly running timer, so there should be a cleaner / easier way to achieve this.

Any ideas? How can I tie and raise an event while minimizing the window?

* note: show and movewindow are functions from user32.dll. I am not trying to catch when MY forms are minimized, but when OTHERS programs exist.

+5
source share
1 answer

You can create a hook to check when windows are minimized.

I found a CodeProject article that uses hooks to check when a user opens the system menu ( ALT+ SPACE) on any window and then adds an additional element to it. You can use this code to check when the user clicks the Minimize button and runs any code that you need.

The CodeProject article is written in C ++, but you can adapt the same method for C # (or use P / Invoke).

+1

All Articles