title: how to capture clicks event on other window that has been minimized
body: <p>i want to build an app that work in the background, and will capture all click events 
  on the minimize button, of all opened forms / windows that actually running.  (not only in my current app) </p>
  
  <p>it will be some sort of hook to add minimize handler to all of other windows. </p>
  
  <p>how to setup this kind of hook ? ( please provide some code example in csharp with marsheling )</p>
  
  <p>To better understand the idea : this procedure already exists in program called TrayIt that handle Ctrl+Click on the Minimize button, and send programs to system tray .</p>
  
  <p><strong>EDIT</strong>: </p>
  
  <p>i have found that <strong>SetWindowsHookEx</strong> cannot set a global hook with c# due to limitation in manged code (see the msdn documentation ) </p>
  
  <p>but may <strong>WinEventProc</strong> with EVENT_OBJECT_STATECHANGE should do the work</p>