The AcceptButton along with the CancelButton are Form Properties that work only with buttons in C# Visual Studio. When these Form Properties are set, pressing enter or escape causes the click event to be executed