With the following:
this.AcceptButton = this.OKButton;
this.OKButton.Enabled = false;
... will the OK button click handler still be invoked when the user presses Enter?
With the following:
this.AcceptButton = this.OKButton;
this.OKButton.Enabled = false;
... will the OK button click handler still be invoked when the user presses Enter?
No, when the button is disabled, it will not activate and trigger that event.
AcceptButton/CancelButton just call the button's PerformClick() method... which doesn't run if the control is disabled.