public void clearBK() { if (form != null) { if (!form.IsDisposed) { form.Close(); form.Dispose(); } form = null; } }
protected override void OnClosing(CancelEventArgs e) { Config.SetEditorPropertyGridPosition(editor.Location, XML_Editor); Config.SetEditorPropertyGridPosition(_toolBox.Location, XML_Toolbox); if (formHS != null) { if (!formHS.IsDisposed) { formHS.Close(); formHS.Dispose(); } formHS = null; } Form p = this.Parent as Form; if (p != null) { p.DialogResult = this.DialogResult; p.Close(); } }