Share via


IVsPropertyPageNotify.OnShowPage Method

Called whenever a property page window changes visibility.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaration
Function OnShowPage ( _
    fPageActivated As Integer _
) As Integer
int OnShowPage(
    int fPageActivated
)
int OnShowPage(
    [InAttribute] int fPageActivated
)
abstract OnShowPage : 
        fPageActivated:int -> int
function OnShowPage(
    fPageActivated : int
) : int

Parameters

  • fPageActivated
    Type: System.Int32

    [in] Indicates whether the property page window is visible or not. If true, the window is visible. If false, the window is not visible.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

OnShowPage(false) is called on the page being deactivated before OnShowPage(true) is called on the new page becoming visible.

This method should not be confused with Activate or Deactivate, which are called when the page object should be created and destroyed. For example, when a page is displayed, Activate is called to create the page. When a different property page tab is activated, then OnShowPage(false) is called on the first page, but Deactivate is not called. Deactivate is only called when the property page objects are no longer being used at all (for example, during a selection change or when the property page frame window is closed). If a property page is being shown for the first time, then OnShowPage(true) is called after Activate is called.

COM Signature

From vsshell.idl:

[C++]

HRESULT IVsPropertyPageNotify::OnShowPage(
   [in] BOOL fPageActivated
);

.NET Framework Security

See Also

Reference

IVsPropertyPageNotify Interface

Microsoft.VisualStudio.Shell.Interop Namespace