Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Possible to have more than one active Read Events?
Message
 
 
To
27/04/2007 16:48:18
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01220531
Message ID:
01220683
Views:
21
>>A guy here at work wants to have more than one Read Events active at a time. He has a "dashboard" application from which users can run various other applications. Both the dashboard app and the called app have a Read Events. The second one is ignored, which is exactly what the help says will happen. He thinks he saw a workaround in FPA or some other magazine a few years ago. Does anyone know of one?
>
>I cut this form my "Tips and Tricks" page on my web site.
>
>
>Sometimes we need to set a form up as the base form to a event loop, but we already have established a READ EVENTS statement. Well DOEVENTS to the rescue. Placing a DOEVENTS in a DO WHILE loop simulate the READ EVENTS statement. The _Exit variable controls the final exit of the loop. The last form sets it to .T. when it closes.

>
>
>DO FORM ...
>...
>Private _Exit
>DO WHILE NOT _Exit
>    DOEVENTS
>ENDDO
>
>
>When running, it does not loop unless the mouse moves, clicks, keyboard is typed, or any other similar activately occurs.
>
>Hope it helps.


Thanks, Greg. Sounds like a winner. I will give it to my coworker on Monday and tell him to give it a shot.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform