Results 1 to 3 of 3

Thread: How to create a "Back" and "Forward" button for the Web Browser Control

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Location
    Atlanta, GA
    Posts
    177

    How to create a "Back" and "Forward" button for the Web Browser Control

    Does anyone know how to create a "Back" and "Forward" button for the web browser control? Thanks in advance.
    212 will lead you to the truth

  2. #2
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    Draw them like a normal button then use this code:

    Code:
    WebBrowser1.GoBack
    WebBrowser1.GoForward
    WebBrowser1.Stop
    WebBrowser1.Refresh2 3
    You know where To put this code I hope.

    You also need this code To enable/disable the buttons For you:

    Code:
    Private Sub WebBrowser1_CommandStateChange(ByVal Command As Long, ByVal Enable As Boolean)
        ' this Event allows enabling And disabling of forward/backward buttons (cool!)
        Select Case Command
            Case CSC_NAVIGATEFORWARD
                Me.Command1(1).Enabled = Enable 'toggle forward button state
            Case CSC_NAVIGATEBACK
                Me.Command1(0).Enabled = Enable 'toggle back button state
        End Select
    End Sub

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Location
    Atlanta, GA
    Posts
    177
    Thanks. Works perfectly.
    212 will lead you to the truth

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width