Interrupt a scan with a button.MouseClick 
Author Message
 Interrupt a scan with a button.MouseClick

Quote:

> Hi,
> I use Paradox 5.0 on Win'95.
> In a form, I have 1 OK button with the following code :

>         Scan
>                 call a function that do calculation, generate a report and print it
>         Endscan
> In the same form, I have another button called "Stop Printing"

> How can I do to make the program "read" that the user have clicked on "Stop
> Printing" ?

> The OK Button never give a chance to wait for any click during this
> Scan..endscan

> Thanks for help

Try putting the command SLEEP() inside the loop.  If this does not work
you will have to put the stop button on *ANOTHER* form which thr SLEEP()
command will give time to to capture the stop.  

This button will set a global variable which is checked in the scan loop
on the other form.  When the correct vale is set... stop the loop.

Notice:  The queries cannot be interupted from within OPAL.

HTH

Che



Sun, 05 Sep 1999 03:00:00 GMT
 Interrupt a scan with a button.MouseClick

Hi,
I use Paradox 5.0 on Win'95.
In a form, I have 1 OK button with the following code :

        Scan
                call a function that do calculation, generate a report and print it
        Endscan
In the same form, I have another button called "Stop Printing"

How can I do to make the program "read" that the user have clicked on "Stop
Printing" ?

The OK Button never give a chance to wait for any click during this
Scan..endscan

Thanks for help



Sun, 05 Sep 1999 03:00:00 GMT
 Interrupt a scan with a button.MouseClick

Um - what happens if you put a Sleep() in there somewhere?

If that allows Pdox to process the other event, you could have a form-level
variable that you check mid-scan to see if it's ok to continue. The
StopPrint button could set that variable to false.

Quote:
> I use Paradox 5.0 on Win'95.
> In a form, I have 1 OK button with the following code :

>    Scan
>            call a function that do calculation, generate a report and print it
>    Endscan
> In the same form, I have another button called "Stop Printing"

> How can I do to make the program "read" that the user have clicked on
"Stop
> Printing" ?

> The OK Button never give a chance to wait for any click during this
> Scan..endscan



Mon, 06 Sep 1999 03:00:00 GMT
 Interrupt a scan with a button.MouseClick

On 20 Mar 1997 14:09:04 GMT, "Nanette Holkestad"

Quote:

>> Um - what happens if you put a Sleep() in there somewhere?

>> If that allows Pdox to process the other event, you could have a form-level
>> variable that you check mid-scan to see if it's ok to continue. The
>> StopPrint button could set that variable to false.

I always put a Sleep() statement at the top and bottom of any scan
structure so windows can process other requests and you can set a
variable that triggers a QuitLoop within the structure, however you
have to exercise great care as to how you handle the exit in terms of
the code outside the scan... every logic structure following must have
a contingency for the exit state.

Rick Cooper



Wed, 08 Sep 1999 03:00:00 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. Interrupt button on PROMPT statement in Dynamic-4GL

2. Table scan, Table scan, Table scan

3. Running multiple scans from single button.

4. Clustered Index Scan vs. Table Scan

5. Table Scan - Scans more records than are there

6. TABLE SCAN Vs INDEX SCAN/SEEK

7. question about seq scan and index scan

8. Index Scans become Seq Scans after VACUUM ANALYSE

9. Index Scans become Seq Scans after VACUUM ANALYSE

10. Index Scans become Seq Scans after VACUUM ANALYSE

11. Index Scans become Seq Scans after VACUUM ANALYSE

12. Need help on auto mouseclick!


 
Powered by phpBB® Forum Software