Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cancel button releases form, but running proc continues.
Message
From
08/02/2002 16:17:25
 
 
To
08/02/2002 15:55:02
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00617682
Message ID:
00617700
Views:
26
Tracy,

When the user presses escape while a process is running, do you want the form (mentioned in your first sentence) to stay visible? Or do you want the process to stop and then the release the form?

>I have a strange situation. I have a prg that calls a form with do form ... then the form has a readonly grid on it that allows the user to browse records. Records are updated via edit options on the menu. There are other options on the menu which run procedures contained in the same file that called the form. I have a file/exit option on the menu and a hidden cancel button on the form so that when a user presses escape, the form is released and the program that called the form returns to its main program correctly. If a user presses escape then the form is released as it should be, and the object reference to the form no longer exists just as it should be. Here is my problem:
>
>If the user clicks on the menu and runs a procedure in the background, I have an animation form that runs to let the user know to wait for processing to finish. However, if the user presses escape while this procedure is running (the procedure uses a reference to mscomm32: ocomm.output="whatever" and then waits for all of the data back from the port to update the grid in the form) the form is released and the procedure of course starts throwing out error messages: 'ocom does not exist' etc... I need to be able to stop the procedure from continuing when the user presses escape also. The user could be waiting for a LOT of data from the comport and I am releasing all objects as I need to correctly if the user presses escape, but the procedure continues on of course which creates a problem. There are additional calls to ocom further down the procedure. I need a way of making the procedure stop. There are many procedures like this and I hate to go through and check for a public
>variable to know if processing should continue everywhere, etc... Any ideas? Am I missing something obvious?
>
>I really want the user to be able to press ESCAPE and stop all activity and return to the menu if necessary, because these are very busy offices with customers and they need to be able to stop if necessary and return to run it later instead. There is no problem of losing data from pressing escape while any procedures are running (except one and I disable pressing escape in that instance), because the phonetree system off the port holds the data until I force it to change.
>
>TIA Everyone!
>Tracy
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform