DialogPage::OnActivate Method (CancelEventArgs^)

 

Handles Windows Activate messages from the Visual Studio environment.

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

protected:
virtual void OnActivate(
	CancelEventArgs^ e
)

Parameters

e
Type: System.ComponentModel::CancelEventArgs^

[in] Arguments to event handler.

This method is a handler for Windows events, and is not a managed delegate.

An Activate message is sent, and this method is called when the user interface of the dialog page is visible and receives focus.

The default implementation sets the dialog page's internal user interface state to active.

Because this state is used throughout the parent class, implementations should always call the base implementation of this method when overriding.

This example implementation of OnActivate first calls the base implementation of the method, and then refreshes user controls.

protected override void OnActivate(CancelEventArgs e) {
    base.OnActivate(e);
    Panel.OnActivate();   // we want to reload controls from toolbox...
}
Return to top
Show: