Hi!
You can detect if VFP application is still active only by using the Windows API functions that query if main VFP application window is still active. To trigger the code when switching occurs, make a timer class and put it on the scren at start of the application. In its timer event check constantly with some period (200 miliseconds is enough) if application is still active. If activity changes - trigger the code (to see if changed, you will need to store previous state in some variable or property).
HTH.
>The Activate() and Deactivate() methods don't (seem to) work when switching between the vfp-application and other applications. I want to do a certain action when the user clicks outside my app, and I want to do another action when the user re-enters my app.
>Who has the golden advice? I will certainly give points!
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.