Jim,
check Tools->Task Pane Manager->Solution Samples->New in Visual FoxPro 9.0->Binding to Windows Message Events. One of the events in the samples is "application switching", sounds like what you are looking for.
>I have a little app that has one form running with DeskTop = .T.
>
>Once I have moved off the app to do anything else, I would like to have a timer running to update the caption (a simple count of items).
>
>When I return to the app, I want to refresh the grid.
>
>However, there don't seem to be any events that fire when I leave the app or return to it.
>
>Suggestions, anyone?
>
>Thanks