Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WebBrowser2.Navigate URL, navNoReadFromCache

Status
Not open for further replies.

kennedymr2

Programmer
May 23, 2001
594
AU
I am using the webbrowser control to load a page.
Am using WebBrowser2.Navigate URL, navNoReadFromCache

In the WebBrowser2_DocumentComplete(ByVal pDisp As Object, URL As Variant), i am capturing the text from the page.
ie. RichTextBox1.Text = WebBrowser2.Document.documentelement.InnerHTML

I am pretty sure that the noreadfromcache does not "allways" work???!! But i could be wrong.

I need to ensure that every time the page is called for, the latest page is reloaded.

?Is the above code correct, or is there a better way of doing it.

Appreciate any advice.
 
>does not "allways" work???!!

Theoretically does not ever work. The flag is unsupported (and documented as such)
 
I would say use IWebBrowser2::Refresh is supposed to do the job, and IWebBrowser2::Refresh2 for richer feature. (As an aside, the navNoReadFromCache or similar flags might never be supported after all these years!? and are abandoned like an orphan.)
 
Strongm (MIS), Thanks for the bad news, i suspected it did not work, but could not find any confirmation.

tsuji (TechnicalUser),
I will have a good look at the IWebBrowser2::Refresh2
and see if i can get some result.

Appreciate the help offered, it has saved me a lot of wasted time.

Will post a comment when i have tried all other options.

Regards Kennedymr2
 
I believe!!! i have it running by using the following, very .
Fustrating this refresh thing in webbrowser.

Private Const REFRESH_COMPLETELY = 3
-----------------------------------------

WebBrowser1.Navigate2 Url, navNoHistory

etc.........wait for completion

WebBrowser1.Refresh2 REFRESH_COMPLETELY

etc......wait for completion

------------------------------------------
and capturing the text in:

Private Sub WebBrowser1_DownloadComplete()

I am pretty sure i have the whole thing working !!!, but let me know if what i am doing could NOT be the answer.

Regards Kennedymr2




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top