title: How to determine whether my application is active (has focus)
body: <p>Is there a way to tell whether my application is active i.e. any of its windows has .IsActive=true?</p>
  
  <p>I'm writing messenger app and want it to flash in taskbar when it is inactive and new message arrives.</p>