Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Page is correctly loaded?
Message
De
12/10/2001 03:38:12
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00566703
Message ID:
00567431
Vues:
12
Hi José,

this is the code my applications use to establish a connection to a home banking site, including a progress bar for the user.
The max time given to the web browser control to open the site is in lnHBFailureDelay.
    loIE.Navigate(lcHBURL)
    llReady = .F.
    ltStart = DATETIME()
    lfrmPB  = CREATEOBJECT("frmprogressbar",
                           "WebSite der Bank wird gesucht... (max. Dauer: "
                           +TRANSFORM(lnHBFailureDelay)+" s)")
    WITH lfrmPB
      .setBar(0)
      .Show()
      lnSec = 0
      DO WHILE (DATETIME()-ltStart) <= lnHBFailureDelay
        lnBuf = INT(DATETIME()-ltStart)
        IF lnBuf > lnSec 
          lnSec = lnBuf
          .setBar(100*lnSec/lnHBFailureDelay)
          IF loIE.ReadyState >= READYSTATE_LOADED
            llReady = .T.
            EXIT
          ENDIF
        ENDIF
      ENDDO
    ENDWITH
    lfrmPB = .NULL.
    IF NOT llReady
* site is not there 
    ENDIF
HTH Robert
I've acquired quite a taste for a well-made mistake... [Fiona Apple]
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform