Results 1 to 4 of 4

Thread: Form won't load

  1. #1
    slalom
    Guest

    Form won't load

    When I run my program (in design time), the form never completely loads. However, when I use a webrowser control (in code below) on form2, it works. On the main form, it doesn't. Anybody know whats wrong? This is the sample inet project with my own stuff added in (i.e. the webbrowser). Thanks.

    Code for Form_Load

    Private Sub Form_Load()
    On Error GoTo Error_Line
    connected = False
    aPath = App.Path: If Right$(aPath, 1) <> "\" Then aPath = aPath & "\"

    txtDate = Format$(Now, "Long Date")
    connected = True
    WebBrowser1.Navigate "http://www.srh.noaa.gov/data/mem/cli/memclimem.1.txt", 4
    Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE
    DoEvents
    Loop
    WebBrowser1.Refresh
    source = WebBrowser1.Document.documentElement.innerHTML
    Open "c:\CDSource.txt" For Output As #1
    Print #1, source
    Close #1
    Open "c:\CDSource.txt" For Input As #1
    y = 0
    For x = 1 To 32
    Line Input #1, data(y)
    y = y + 1
    Next x
    'cmdConnect_Click
    Timer5.Enabled = False
    Exit Sub
    Error_Line:
    MsgBox Err.Number & " " & Err.Description
    End Sub

  2. #2
    slalom
    Guest

    oh yea

    Oh yea I forgot to mention that when I take out the Do until loop, it runs past it but then errors at the webbrowser1.refresh. Therefore I think what is holding it up is the Do Until loop.

  3. #3
    Addicted Member stevess's Avatar
    Join Date
    May 2001
    Posts
    251
    Get rid of the WebBrowser1.Refresh

  4. #4
    slalom
    Guest

    nope

    nope same problem

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