AcceptButton is a form property and cannot be used for UserControl. You can simply override ProcessCmdKey, although this will work as long as the user control has focus. Otherwise, you will need to use the AcceptButton of the form separately or override the ProcessCmdKey in the form if you have several controls that can be active.
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == Keys.Enter) { button.PerformClick(); return true; } return base.ProcessCmdKey(ref msg, keyData); }
source share