Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to exit from a scan when i am in a Timer object?
Message
From
05/02/2002 06:40:20
 
 
To
05/02/2002 04:08:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00615273
Message ID:
00615322
Views:
15
Hi!

Put in the loop the DOEVENTS command. This will force firing of all events, include button clicks and ON KEY commands. ON KEY commands will interrupt the program without DOEVENTS only if _VFP.AutoYield = .T., that is why you get it work not always. Though I recommend to show a "Cancel" button on the form during the process and use DOEVENTS in the loop, so user can press on the Cancel button to interrupt the long process.

HTH.

>Hi all
>
>I have a screen with a timer on that scans on a file every 20 seconds and if there is an outstanding job it calls an OLE server method to do a specific job. The problem I have, is how to interrupt the timer and get back on the screen.
>
>I tried to have a button on the screen but i never get focus.
>I tried to have ON KEY LABEL CTRL+END m.user_stop = .T.
>
>SELECT JOBS
>SCAN FOR EMPTY(JOBS.STATUS) &&& Scanning only jobs not completed
> if m.user_stop = .t.
> wait wind 'Exit job ........'
> exit
> endif
>
> ******** CALL SERVER
> OX=CREATEOBJECT(MYSERVER.MYMETHOD)
> ...
>
>ENDSCAN
>
>
>With the above code sometimes the process interrupted but not always.
>
>Any ideas ?
>
>Petros
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform