public void Close() { DockPanel dockPanel = this.DockPanel; if (dockPanel != null) dockPanel.SuspendLayout(true); this.Form.Close(); if (dockPanel != null) dockPanel.ResumeLayout(true, true); }