WindowActivate Event
Occurs when a window is activated.
Private Sub expression_WindowActivate(ByVal pWebWindow As WebWindowEx)
expression The variable name of an object of type Application declared using the WithEvents keyword in a class module.
pWebWindow The WebWindowEx object.
Remarks
When an instance of Microsoft FrontPage obtains the focus, a WindowActivate event will fire for each open window.
Example
The following example prompts the user to close the window when the FrontPage window obtains the focus.
Private Sub expression_WindowActivate(ByVal pWebWindow As WebWindowEx)
'Occurs when a FrontPage window obtains focus.
Dim strAns As String
strAns = MsgBox("Are you sure you want to open the window " _
& pWebWindow.Caption & "?", _
vbYesNo)
If strAns = vbNo Then
pWebWindow.Close
End If
End Sub