Share via


WizardPage.Activate Method

Definition

When overridden in a derived class, indicates that the form has been loaded for the first time

protected public:
 virtual void Activate();
protected internal virtual void Activate ();
abstract member Activate : unit -> unit
override this.Activate : unit -> unit
Protected Friend Overridable Sub Activate ()

Examples

The following example demonstrates the Activate method. This example creates a custom Activate method that displays a description and a caption on the wizard form. This code example is part of a larger example provided for the WizardPage class.

// Activate is called upon initial load.
protected override void Activate()
{
    Description = this.Name;
}
protected override void Activate()
{
    _description = this.Name;
    _caption = "Original Caption";
    this.button4.Text = "Change R to L Layout : currently " + RightToLeft.ToString();
}

Remarks

If implemented in your code, this method is called when the page is first loaded. This method enables you to create a custom Activate method that could, for example, load initial values that are required for the wizard page or initialize specific buttons or text boxes that will be enabled when the user completes a page.

Applies to