Closing a Docked form programmatically

Hi All

I just started using this set of controls and needs help on following.

I changed a form to be dockable form using

dockingManager.FloatControl(form, form.ClientRectangle);

however when i close my form using this.Close(); still the dockhost is visible. and when i try to close it it give an argumentoutofboundexception
at System.Windows.Forms.Control.ControlCollection.get_Item(Int32 index)
at Syncfusion.Windows.Forms.Tools.DockHostController.CloseController()
at Syncfusion.Windows.Forms.Tools.FloatingFormController.CloseController()
at Syncfusion.Windows.Forms.Tools.FloatingForm.WndProc(Message& msg)

I need to close the form programatically in C#.

Please elaborate on how to do.

Thanks in Advance
Waruna



1 Reply

PJ Poly J Syncfusion Team April 19, 2007 07:35 AM UTC

Hi Waruna,

Thanks for your interest in Syncfusion Products.

Please set the EnableDocking to false before closing the form.

this.dockingManager1.SetEnableDocking(form, false);
form.Close();

Please refer to the attached sample and let me know if you need further assistance with this incident.

http://websamples.syncfusion.com/samples/Tools.Windows/F59599/main.htm

Best Regards,
Poly


Loader.
Up arrow icon