>Hi all!
>I would like to trap lostfocus and gotfocus of VFP screen. For example, If I am working with a window of application's VFP, then I change into windows window of MS Word. As aresult my application's VFP appears a message to the user.
>Please help me.
>Canh
For versions of VFP earlier than 8, you can try this:
* screenmethods.prg
DEFINE CLASS sm AS Custom
SM = _SCREEN
FUNCTION SM.LostFocus
WAIT WINDOW "LostFocus"
ENDFUNC
FUNCTION SM.GotFocus
WAIT WINDOW "GotFocus"
ENDFUNC
ENDDEFINE
* your code
SET PROCEDURE TO screenmethods
oScreenMethods = CREATEOBJECT("sm")