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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top