ok... how do i detect when the focus changes to a window??(all windows even ones outside the project) and i need to return the hwnd of the window just activiated aswell

Thanks in advance
Kris