c# program , get notification when user switch between applications
<p>Want to hook my c# code to some windows API so that I can get a notification when the logged in user switch between windows(programs) open on the desktop</p>

<ul>
<li>Event/Notification:- when user switch between applications. For example we have notepad,work,excel,outlook,IE open in parallel on the same desktop.</li>
</ul>

<p>Is polling the only way ? say every 5 mins- for current  active window on desktop. that will not be very efficient. </p>

<p>I want to run this program on windowsXP.</p>
