If you are working in C# winforms and need to respond to window minimize and maximize events, it seems that winforms does not provide native event handlers. Sucha feat is still very much possible through hooking into the Windows API.
The exact message you need to catch is WM_SYSCOMMAND and look for the SC_* messages:
- SC_CLOSE 0xF060
- SC_MAXIMIZE 0xF030
- SC_MINIMIZE 0xF020
- SC_RESTORE 0xF120
There are indeed more messages. Check the above link for a full list. Now for some sample code: