
How VB knows the application is swapped?
Quote:
>Does anyone knows how to make VB knows that the user swap to another
>application. Form_Deactivate and Form_LostFocus fail to do so.
Workaround:
Place a timer on the form and set it to fire every x milliseconds. In the
_Timer event, get the active window's hWnd using the GetActiveWindow API.
Then compare it to the .hWnd of your apps currently loaded form. If they
don't match, you're no longer the active app.
--
Newbiehood is not a period of time, it's a way of life.
http://www.sn.no/~balchen/
ftp://ftp.sn.no/user/balchen/