OnBeforeSubViewChange Event

       

Occurs before the subview of the web 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 with events in a class module.

TargetSubView   An FpWebSubView enumerated constant that represents the new subview type.

Cancel   A Boolean that determines if the operation will be cancelled. If False, the subview will change view types.

Example

The following example prompts the user before changing the subview of the web window. If the user clicks No, the subview will not change. If the user clicks Yes, the subview 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