다음을 통해 공유


DialogPage.OnActivate(CancelEventArgs) Method

Definition

Handles Windows Activate messages from the Visual Studio environment.

protected:
 virtual void OnActivate(System::ComponentModel::CancelEventArgs ^ e);
protected virtual void OnActivate (System.ComponentModel.CancelEventArgs e);
abstract member OnActivate : System.ComponentModel.CancelEventArgs -> unit
override this.OnActivate : System.ComponentModel.CancelEventArgs -> unit
Protected Overridable Sub OnActivate (e As CancelEventArgs)

Parameters

e
CancelEventArgs

[in] Arguments to event handler.

Examples

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...  
}  

Remarks

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.

Applies to