Back butons in VB browsers

I made a VB browser that connected to the interned, but I want it to have a back button, how do I do this?

Thanks

Comments

  • : I made a VB browser that connected to the interned, but I want it to have a back button, how do I do this?
    :
    : Thanks
    :

    Add this code to the webbrowser event:

    [code]
    Private Sub WebBrowser_CommandStateChange(ByVal Command As Long, ByVal Enable As Boolean)
    If Command = CSC_NAVIGATEFORWARD Then
    canGoForward = Enable ' Set Forward to true/false
    Toolbar2.Buttons.Item(3).Enabled = Enable ' Dis/Enable Forward Button on toolbar
    End If
    If Command = CSC_NAVIGATEBACK Then
    canGoBack = Enable ' Set Back to true/false
    Toolbar2.Buttons.Item(2).Enabled = Enable ' Dis/Enable Back Button on toolbar
    End If
    End Sub
    [/code]

    Then to navigate forward and back, make the following call:
    [code]webBrowser.goBack[/code]
    or
    [code]webBrowser.goForward[/code]


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion