Results 1 to 6 of 6

Thread: Looping in a function

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    879
    I have a function called Go(HowMany As Integer). I want this function to go to a WebPage over and over which is specified by HowMany! But I also want it to wait untill the page is full loaded and then go to the page again! If u need me to clairify things for please say so! This is important!
    Visual Basic 6.0
    Visual C++ 5
    Delphi 5


  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    To do something as many times as HowMany says:
    Code:
    Private Sub Go(HowMany As Integer)
        'do it HowMany times
        For i = 1 To HowMany
            'do stuff here
            '...
        Next
    End If
    And to download a webpage: http://www.vbsquare.com/tips/tip171.html.
    Oetje
    [email protected]
    93606776
    Visual Basic 6, Windows 2000

    Never pet a burning dog

  3. #3
    Guest
    Use the Navigate function for the WebBrowser Control to go to webpages.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    879
    Megatron, I know that but I want my function to wait untill the webbrowser is ready and then go to another webpage!
    Visual Basic 6.0
    Visual C++ 5
    Delphi 5


  5. #5
    Hyperactive Member theman32x's Avatar
    Join Date
    May 2000
    Location
    New Jersey, USA
    Posts
    305
    i think there is an event in the webcontrol that allows you to see when the file finished ... it something completedownload or document ... i am currently vb-less cause i formatted so i can't check it for u

  6. #6
    Guest
    The Webbrowser Control has a ReadyState property which is what you are probably looking for.

    And here are it's tags:

    READYSTATE_COMPLETE
    READYSTATE_INTERACTIVE
    READYSTATE_LOADED
    READYSTATE_LOADING
    READYSTATE_UNINITIALIZED


    I guess it's used like:

    Code:
    WebBrowser1.Navigate "http://www.vb-world.net"
    If WebBrowser1.ReadyState = READYSTATE_COMPLETE Then
    MsgBox "Vb-World has been fully loaded.", _
    32, "Where do you want to go today?"
    End If

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width