0

I want to catch the event when my form is being minimized.

I have added WndProc messages for SC_Minimize for WM_SYSCommand. But it doesn't hit when Win+D is pressed or Win+M is pressed or Peek Desktop button is clicked.

I have added keyboard hook for Win+D and Win+M but still troubled for the third option.

Is there any windows event or WndProc message I can track that will notify me as soon as the button is clicked.

My form size is changed If I use WM_Size so any are there any message which is directly linked to it.

Thanks, Aman

Aman Seth
  • 166
  • 6
  • don't forms have a minimize_Click()? – Jacobr365 Apr 19 '16 at 13:05
  • But I want to Handle some code on Form Minimize. And How Can I handle that if user minimizes through some other method than clicking on minimize button – Aman Seth Apr 19 '16 at 13:07
  • Possible duplicate of [How to detect when a windows form is being minimized?](http://stackoverflow.com/questions/1052913/how-to-detect-when-a-windows-form-is-being-minimized) – rinukkusu Apr 19 '16 at 13:17
  • @rinukkusu nope already mentioned that those are not working in my case. – Aman Seth Apr 19 '16 at 16:03

0 Answers0