Iain
Iain

Reputation:

How to set a windows form's AcceptButton to None at run time

To set a form's AcceptButton at runtime, I'm doing this:

this.AcceptButton = this.btnButtonName;

But can anyone tell me how to clear the form's AcceptButton, something like:

this.AcceptButton = None; 

Thanks.

Upvotes: 2

Views: 3691

Answers (1)

John Saunders
John Saunders

Reputation: 161831

Try this:

this.AcceptButton = null;

Upvotes: 6

Related Questions