|
-
Nov 17th, 2012, 02:58 PM
#1
Thread Starter
Addicted Member
webbrowser general help
i made a tool yes its running a webbrowser how can i programme my tool so if the page i want dont fully load up and it gets stuck while its loading up and stays there hanged how do i get the page to refresh and reload the page.
1 : webbrowser1.navigate2 "example.com" the page gets hanged sometimes and stays there untill i manually press refresh.
2: how do i put in some code so the timer runs and if that page isnt loaded then refresh the page and reload till webbrowser is loaded
-
Nov 17th, 2012, 04:55 PM
#2
Re: webbrowser general help
I would THINK you start a time each time you start loading a page. Then after a certain number of seconds in your timer, do your webbrowser1.navigate routine again---and when loaded, stop your timer. So I guess you need to know WHEN the page is fully loaded.....you can check that with this routine:
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object,
URL As Variant)
If (pDisp Is WebBrowser1.Object) Then
MsgBox "Web document is finished downloading"
End If
End Sub
-
Nov 17th, 2012, 05:20 PM
#3
Thread Starter
Addicted Member
Re: webbrowser general help
-
Nov 17th, 2012, 06:42 PM
#4
Re: webbrowser general help
the question here is why does it get stuck? a page is suppose to load when you navigate to it.
if it does not load properly it is either an error message (that you will need to click yes/no or OK)
you only get those script error with webbrowser and not internet explorer.
have you tried setting WebBrowser1.Silent = True at Form_Load()?
if we could see which website it is doing that we could help you a bit more, I remember you said yahoo but i only had that script error popup once and now its always running fine
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
|