Hi to All,

I am trying to run a FOR... ENDFOR process and want to have an OLE progressbar and an active CANCEL button. How can I do this? I've tried several times but the click event of my CANCEL button seems not to work while inside the FOR... ENDFOR process... Can you help?

Allan

Re: Cancel button while Processing by David

David
Tue Jun 29 22:49:07 CDT 2004

Allan,

In your loop you should put a DOEVENTS command which will allow VFP to check
the event queue for the button click.

--
df - Microsoft MVP FoxPro http://www.geocities.com/df_foxpro

"Allan" <Allan@discussions.microsoft.com> wrote in message
news:80949D05-35CA-4643-9C55-3DF6767953FC@microsoft.com...
> Hi to All,
>
> I am trying to run a FOR... ENDFOR process and want to have an OLE
progressbar and an active CANCEL button. How can I do this? I've tried
several times but the click event of my CANCEL button seems not to work
while inside the FOR... ENDFOR process... Can you help?



Re: Cancel button while Processing by Gene

Gene
Tue Jun 29 23:47:31 CDT 2004

"Allan" <Allan@discussions.microsoft.com> wrote:

>I am trying to run a FOR... ENDFOR process and want to have an
OLE progressbar and an active CANCEL button. How can I do this?
I've tried several times but the click event of my CANCEL button seems
not to work while inside the FOR... ENDFOR process... Can you help?

Besides David's solution, you can use sys(1270) and mdown().

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.

Re: Cancel button while Processing by Jack

Jack
Tue Jun 29 23:46:34 CDT 2004

On Tue, 29 Jun 2004 22:49:07 -0500, "David Frankenbach"
<sendnospam@sendnospam.net> wrote:

>Allan,
>
>In your loop you should put a DOEVENTS command which will allow VFP to check
>the event queue for the button click.

Just beware that the DOEVENTS will allow any other events to occur
too, such as closing the form or pressing any other button or menu
item.


Re: Cancel button while Processing by David

David
Wed Jun 30 21:05:12 CDT 2004

Jack,

You are right. Making the form modal and adding code to QueryUnload (or
setting Closable = .f.) will deal with those items.

--
df - Microsoft MVP FoxPro http://www.geocities.com/df_foxpro

"Jack Jackson" <jacknospam@pebbleridge.com> wrote in message
news:oah4e0p60ur2g4lpd7s1hi4fsso45vq977@4ax.com...
> On Tue, 29 Jun 2004 22:49:07 -0500, "David Frankenbach"
> <sendnospam@sendnospam.net> wrote:
>
> >Allan,
> >
> >In your loop you should put a DOEVENTS command which will allow VFP to
check
> >the event queue for the button click.
>
> Just beware that the DOEVENTS will allow any other events to occur
> too, such as closing the form or pressing any other button or menu
> item.
>



Re: Cancel button while Processing by Allan

Allan
Sun Jul 04 21:50:01 CDT 2004

Thank to ALL for you help!

Allan

"David Frankenbach" wrote:

> Jack,
>
> You are right. Making the form modal and adding code to QueryUnload (or
> setting Closable = .f.) will deal with those items.
>
> --
> df - Microsoft MVP FoxPro http://www.geocities.com/df_foxpro
>
> "Jack Jackson" <jacknospam@pebbleridge.com> wrote in message
> news:oah4e0p60ur2g4lpd7s1hi4fsso45vq977@4ax.com...
> > On Tue, 29 Jun 2004 22:49:07 -0500, "David Frankenbach"
> > <sendnospam@sendnospam.net> wrote:
> >
> > >Allan,
> > >
> > >In your loop you should put a DOEVENTS command which will allow VFP to
> check
> > >the event queue for the button click.
> >
> > Just beware that the DOEVENTS will allow any other events to occur
> > too, such as closing the form or pressing any other button or menu
> > item.
> >
>
>
>