Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP BINDEVENTS Screen Activate...
Message
 
 
To
28/02/2003 07:32:41
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00759317
Message ID:
00759321
Views:
16
There's no event in VFP that fires when application gets or loses focus. I guess, you can use timer and Windows API calls to check if your application is topmost one.

>Hi...
>
>What I want is that if the program switched to from another program then
>the activeform should refresh. The problem is I'm not sure what event to bind
>to... The below code works but only if they happen to click on the white screen space and not if the click the title bar or over the activeform to
>active the program.. Does anyone have a solution?
>
>
>
>In vfp8 I tried the following code:
>PUBLIC oScreenHandler
>oScreenHandler=NEWOBJECT("ScreenEventHandler")
>BINDEVENT(_SCREEN,"GotFocus",oScreenHandler,"ScreenActive")
>
>DEFINE CLASS ScreenEventHandler AS Session
> PROCEDURE ScreenActive
> LOCAL otemp
> **refresh activescreen
> MESSAGEBOX("yes")
> oTemp=GetScreen()
> oTemp.Refresh()
> RETURN
>ENDDEFINE
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform