Anchors with web browsers control?

  • Thread starter Thread starter Brett O'Callaghan
  • Start date Start date
B

Brett O'Callaghan

Windows App, VB.Net.

Using the web browser control. Viewing a html document with named
anchors in it.

Triggered by a button outside of the web browser control, how I do
navigate to the anchor within the document.
 
Brett O'Callaghan said:
Windows App, VB.Net.
Using the web browser control. Viewing a html document with named
anchors in it.
Triggered by a button outside of the web browser control, how I do
navigate to the anchor within the document.

And for future searchers in google groups - the solution is

Private Sub NavigateInDocument(ByVal tsLocation As String)
Dim htmlDoc As mshtml.IHTMLDocument2 = CType(html.Document,
mshtml.IHTMLDocument2)
Dim location As mshtml.IHTMLLocation = htmlDoc.location
location.hash = tsLocation
End Sub


(Thanks to Aaron Boodman for the tip)
 
Back
Top