public void SetDefaultButton(string buttonName) { Form form = this.FindForm(); if (form != null) form.AcceptButton = (Button)this[buttonName]; }