Share via


ModulePropertiesPage.CancelChanges Method

Definition

Cancels pending changes.

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

Examples

The following example displays a message box to confirm whether changes should be canceled.

protected override void CancelChanges() {
    DialogResult dr;
    dr = MessageBox.Show("Discard changes?",
         "Red Alert",
         MessageBoxButtons.YesNo
         );
    if (dr == DialogResult.Yes)
        base.CancelChanges();
}

Remarks

This method is called when the user clicks the Cancel button.

This method is implemented in the base class; you do not need to override it unless additional processing is required.

Applies to