Occurs when a window is activated.
Private Sub expression_WindowActivate(ByVal pWebWindow As WebWindow)
expression The variable name of an object of type Application declared with events in a class module.
pWebWindow The WebWindowEx object.
When an instance of Microsoft FrontPage obtains focus, a WindowActivate event will fire for each open window.
The following example prompts the user to close the window when the web window obtains focus.
Private Sub expression_WindowActivate(ByVal pWebWindow As WebWindow)
'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