It is not possible to close a form containing a ColorUIControl from the ColorSelected event.
Here is some sample code to illustrate the problem.
public class Form1 : System.Windows.Forms.Form
private Syncfusion.Windows.Forms.ColorUIControl colorUIControl1;
colorUIControl1 = new Syncfusion.Windows.Forms.ColorUIControl();
colorUIControl1.Location = new System.Drawing.Point(70, 55);
colorUIControl1.Size = new System.Drawing.Size(165, 160);
colorUIControl1.ColorSelected += new System.EventHandler(colorUIControl1_ColorSelected);
this.ClientSize = new System.Drawing.Size(292, 266);
private void colorUIControl1_ColorSelected(object sender, System.EventArgs e)
static void Main()
This is in version 18.104.22.168 but may exist in prior versions.
GPGurucharan Patwal Syncfusion Team December 2, 2003 03:55 PM
Thanks for bringing this to our attention. I did encounter an ObjectDisposedException when I tried the above suggested code. I have notified the development team about this issue and will keep you posted on the developments. Thanks for your patience and we appreciate your feedback.