title: How to monitor focus changes?
body: <p>Well Sometimes I am typing and very rarely it happens that something steals focus, I read some solution (even a VB watch) but they don't apply to me. Is there any windows-wide 'handle' which handles ANY focus changes?</p>
  
  <p>It doesn't matter in which language, C, C++, VB.NET, C#, Anything .NET or windows related, Batch, PoweShell, VBS Script... As Long as I am able to monitor every focus change and log it into a file/cmd window/visual window.</p>
  
  <p>Something like:</p>
  
  <pre><code>   void event_OnWindowsFocusChange(int OldProcID, int NewProcID);
  </code></pre>
  
  <p>would be very usefull. Or maybe there are tools for this already (which I can't find?)</p>