OnPageWindowActivate Event

Microsoft FrontPage Visual Basic

OnPageWindowActivate Event

Occurs when the page in the current window obtains the focus.

Private Sub expression_OnPageWindowActivate(ByVal pPage As PageWindowEx)

expression    The variable name of an object of type Application declared using the WithEvents keyword in a class module.

pPage The PageWindowEx object that contains the view.

Example

The following example prompts the user to refresh the page each time the page window obtains the focus.

    Private Sub objApp_OnPageWindowActivate(ByVal pPage As PageWindowEx)
'Occurs when current page in the main window obtains focus.
'Prompts the user to refresh the current page.

     Dim strAns As String
     strAns = MsgBox("Do you want to refresh the page " & pPage.Caption & "?", _
                      vbYesNo)
     If strAns = vbYes Then
         pPage.Refresh
     End If

End Sub