do something after certain window goes to background

"[email protected] [power-pro]" <[email protected]>
Newsgroups gmane.comp.windows.power-pro
Message-ID <[email protected]>
Is it possible do something after certain window goes to background?
 When i alt+tab after a java app to any window
 this new window has alt pressed.
 So i'm looking workaround.
 Maybe HookWindowEvents can help
 but with arg(1) == 5 a window is focussed, not vice versa.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.