Advertisement
2002C Internet/ HTML #9996

How Enable/Disable Back & Forward in webbrowser

it show how to enable / disable back & forward in a webbrowser control

AI

Riepilogo AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Codice sorgente
original-source
Private Sub WebBrowser1_CommandStateChange(ByVal Command As Long, ByVal Enable As Boolean)
On Error Resume Next
Select Case Command
  Case CSC_NAVIGATEFORWARD
    If Enable = True Then
      'Forward dispo
      ForwardEnable = True
      RaiseEvent ForwardUpdate(True)
    Else
      'Forward non dispo
      ForwardEnable = False
      RaiseEvent ForwardUpdate(False)
    End If
    'Pas de forward
  Case CSC_NAVIGATEBACK
    If Enable = True Then
      BackEnable = True
      RaiseEvent BackUpdate(True)
      'Back dispo
    Else
      BackEnable = False
      RaiseEvent BackUpdate(False)
      'Back non dispo
    End If
End Select
 If Command = -1 Then Exit Sub
'End If
End Sub
Commenti originali (3)
Recuperato da Wayback Machine