Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Lostfocus event of VFP screen, does it?
Message
From
27/01/2003 01:26:58
 
 
To
26/01/2003 23:57:17
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00744598
Message ID:
00745636
Views:
234
>I tryed a program with code below. and I did not see effect when I jumped to another applications as MS Word.
>
>
>&&main program
>CLEAR MEMORY

replace this:
oScreenMethods = CREATEOBJECT("sm")
with this:
_SCREEN.NewObject("oScreenMethods","sm")
>DO FORM tam && testform
>READ EVENTS
>***********************
>PROCEDURE screenmethods.prg &&include in the main program
>DEFINE CLASS sm AS CUSTOM
> sm = _SCREEN
> FUNCTION sm.LOSTFOCUS
> WAIT WINDOW "LostFocus"
> ENDFUNC
>
> FUNCTION sm.GOTFOCUS
> WAIT WINDOW "GotFocus"
> ENDFUNC
FUNCTION sm.Resize
WAIT WINDOW "Resize" NOWAIT  && so it can be seen that it is working
ENDFUNC
>ENDDEFINE

Hmm, my machine at work seemed to work fine with Excel and VFP7, but my machine at home doesn't work for _SCREEN.GotFocus, LostFocus. Not sure what the difference is between the two environments. If you use the CREATEOBJECT(), the events don't seem to fire at all. With _SCREEN.NewObject(), they do within VFP. I had previously not tried all the events, but I had tried KeyPress, Resize, MouseMove, etc., and those worked fine, but still mainly within a VFP environment, not a VFP and other applications. I honestly don't know why my machine at work handles this fine, but mine at home does not. The only difference that I can think of is at work, I have Office XP, while at home I have Office 2000.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform