Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ProgressBar and processing
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00270971
Message ID:
00271430
Vues:
18
>How can I show a progressbar indicating the time left for a process if I have to use Autoyield = .F.
>I have to use the Autoyield because the progressbar makes the process to skip part of it.
>Thank you.
>Eduardo

Eduardo,

Me sorprende el asunto del Autoyield porque no tengo este tipo de problemas. Te doy un ejemplo de como uso un progressbar dentro de un proceso automatizado.
IF lDelete
  this.lblMsg.Caption = "Suppression du jeu de fiches précédent."

  SELECT v_BatchRel28110
  Delete ALL

  lnNext = GETNEXTMODIFIED(0)

  i = 0
  lnStep = MAX(INT( lnMax / 100), 1)

  BEGIN TRANSACTION
  DO WHILE lnNext # 0
    GO (lnNext)
    IF ! TABLEUPDATE()
      llToast = .T.
      EXIT
    ENDIF
    IF MOD ( i , lnStep) = 0
      this.cProgressMeter1.RefreshDisplay(i, lnMax)
    ENDIF
    lnNext = GETNEXTMODIFIED(lnNext)
    i = i + 1
  ENDDO

  this.cProgressMeter1.Reset()

  IF llToast
    ROLLBACK
    TABLEREVERT(.T.)
    ErrorMsg(this.cMsgUpdateFailed)
    RETURN .F.
  ELSE
    END TRANSACTION
  ENDIF
ENDIF
José
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform