Form.UpdateDefaultButton Method


Updates which button is the default button.

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


The UpdateDefaultButton method determines which button on the form raises its Click event when the user presses ENTER, according to the following priority:

  1. If the ActiveControl property implements the IButtonControl interface, that control is the default button.

  2. The AcceptButton property is the default button.

Applies to

See also