public void ClearEvent(System.Windows.Forms.Control control, string eventName) { if (control == null) return; try { Type cType = control.GetType(); EventInfo ei = cType.GetEvent( eventName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); if (ei == null) return; FieldInfo fi = ei.DeclaringType.GetField(eventName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); if (fi != null) fi.SetValue(control, null); } catch { } }