WindowDeactivate Event

Microsoft FrontPage Visual Basic

WindowDeactivate Event

Occurs when a Web window is deactivated.

Private Sub expression_WindowDeactivate(ByVal pWebWindow As WebWindowEx)

expression    The variable name of an object of type Application declared with events in a class module.

pWebWindow    The WebWindowEx object.

Example

The following example prompts the user to close the window when the window loses the focus.

Private Sub expression_WindowDeactivate(ByVal pWebWindow As WebWindowEx)
'Occurs when a Microsoft FrontPage window loses focus.

    Dim strAns As String
    strAns = MsgBox("Do you want to close this window?" _
                     & pWebWindow.Caption & "?", _
                     vbYesNo)
    If strAns = vbYes Then
        pWebWindow.Close
    End If

End Sub