|
-
Jun 3rd, 2001, 02:15 PM
#1
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
-
Jun 3rd, 2001, 02:18 PM
#2
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.
-
Jun 3rd, 2001, 03:18 PM
#3
Addicted Member
Get rid of the WebBrowser1.Refresh
-
Jun 3rd, 2001, 03:21 PM
#4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|