OnBeforeSubViewChange Event
Occurs before the sub view of the Web site window changes.
Private Sub expression_OnBeforeSubViewChange(ByVal TargetSubView As FpWebSubView, Cancel As Boolean)
expression A variable name which references an object of type WebWindowEx declared using the WithEvents keyword in a class module.
TargetSubView An FpWebSubView enumerated constant that represents the new sub view type.
Cancel A Boolean that determines if the operation will be cancelled. If False, the sub view will change view types.
Example
The following example prompts the user before changing the sub view of the Web site window. If the user clicks No, the sub view will not change. If the user clicks Yes, the sub view will change to a new view type.
Private Sub objwebWindow_OnBeforeSubViewChange
(ByVal TargetSubView As FpWebSubView, Cancel As Boolean)
'Occurs when the subview of the active web window is changed
Dim strAns As String
'Prompt user
strAns = MsgBox("Are you sure you want to change the subview?", vbYesNo)
If strAns = vbYes Then
Cancel = False
Else
Cancel = True
End If
End Sub