Sergey,
Thanks a lot!
Ben
>Ben,
>
>Look for
Binding to Windows Message events -> Application Activation in VFP9 Solution samples.
>
>BINDEVENT(_VFP.hWnd, WM_ACTIVATE, THIS, "handlewinmsg" )
>
>
>
>>When I switch to other applications from my VFP application, I want to do something in the VFP application. I believe BindEvent() can let VFP know the user is switching away. Which Windows message should I bind to?