Anchors with web browsers control?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brett O'Callaghan

    Anchors with web browsers control?


    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

    #2
    Re: Anchors with web browsers control?

    Brett O'Callaghan <brettocallagha n@hotmail.com> wrote:
    [color=blue]
    >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.[/color]

    And for future searchers in google groups - the solution is

    Private Sub NavigateInDocum ent(ByVal tsLocation As String)
    Dim htmlDoc As mshtml.IHTMLDoc ument2 = CType(html.Docu ment,
    mshtml.IHTMLDoc ument2)
    Dim location As mshtml.IHTMLLoc ation = htmlDoc.locatio n
    location.hash = tsLocation
    End Sub


    (Thanks to Aaron Boodman for the tip)

    Comment

    Working...