Share via


WizardForm.StartTaskProgress Method

Definition

Starts the progress bar.

protected:
 override void StartTaskProgress();
protected override void StartTaskProgress ();
override this.StartTaskProgress : unit -> unit
Protected Overrides Sub StartTaskProgress ()

Examples

The following example demonstrates the StartTaskProgress method. In this example, the StartTaskProgress method sets the TaskProgressStartColor property to red, the TaskProgressEndColor property to yellow, the TaskProgressScrollSpeed property to 2, the TaskProgressGradientSpeed to 3, the TaskGlyph property to an arrow image, and rotates that image 90 degrees. This code example is part of a larger example provided for the WizardForm class.

// Customize the StartTaskProgressMethod.
protected override void StartTaskProgress()
{
    TaskProgressStartColor = Color.Red;
    TaskProgressEndColor = Color.Yellow;
    // Default TaskProgressScrollSpeed is a value of 6.
    TaskProgressScrollSpeed = 2;
    // Default TaskProgressGradientSpeed is a value of 1;
    TaskProgressGradientSpeed = 3;
    //Set the task Glyph.
    TaskGlyph = Icon.FromHandle(Cursors.Arrow.Handle).ToBitmap();
    TaskGlyph.RotateFlip(RotateFlipType.Rotate90FlipNone);
    // Implement the StartTaskProgress from the base class.
    base.StartTaskProgress();
}
// Customize the StartTaskProgressMethod.
protected override void StartTaskProgress()
{
    TaskProgressStartColor = Color.Red;
    TaskProgressEndColor = Color.Yellow;
    // Default TaskProgressScrollSpeed is a value of 6.
    TaskProgressScrollSpeed = 2;
    // Default TaskProgressGradientSpeed is a value of 1;
    TaskProgressGradientSpeed = 3;
    //Set the task Glyph.
    TaskGlyph = Icon.FromHandle(Cursors.Arrow.Handle).ToBitmap();
    TaskGlyph.RotateFlip(RotateFlipType.Rotate90FlipNone);
    // Implement the StartTaskProgress from the base class.
    base.StartTaskProgress();
}

Remarks

You can customize this method if you implement it in your code. If you do not implement it, a call to the Microsoft.Web.Management.Client.Win32.BaseTaskForm.StartTaskProgress method will display the default progress bar in the wizard form.

In this custom method, you should call the base.StartTaskProgress method to start the task progress bar.

Applies to