Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
More on Cancel & Process stopping
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00389492
Message ID:
00390073
Vues:
17
>>Hi Stephen,
>>
>>>>You can overcome the time overhead off the DOEVENTS by
>>>>
IF MDOWN() OR CHRSAW()
>>>>	DOEVENTS
>>>>ENDIF
>>>>It only fires when there is an event to process. This mechanism is very efficient when calling several times in a second, without loosing significant amounts of time.
>>>>
>>>And the above code would be in my button with the Cancel property?
>>
>>Just like fred said, it should be somewhere in your processing loop. Unlike just using a plain DOEVENTS, this construction works best if it's called very frequently. Since the MDOWN() and CHRSAW() function don't take up much time, it wouldn't affect performance.
>>
>>Walter,
>
>Hi,
>
>Thanks to you Walter, Derek and Fred to responding. One thing is eluding me though, I'd love for this solution to work when I manage to get CreateObjectEX() working and the process is loaded into server memory rather than client. Is CHRSAW() or even MDOWN() going to work then? I haven't put this code in place yet, but will be this eve. In my search for a solution, I'm looking for the ability to be able to have a process running independently stop also.
>
>Thanks,
>Steve

Not sure what interprocess tools windows has, but you could just "poll" a shared datatable for some kind of record that indicates you want to bail-out.
DO WHILE whatever
  IF RECCOUNT('commontable')>0
    IF commontable.flag="STOP"
      EXIT
    ENDIF
  ENDIF
  *
  * normal processing code here
  *
ENDDO
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform