protected void CrossThreadClose(Form f) { if (this.InvokeRequired) { CrossThreadCloseDelegate d = new CrossThreadCloseDelegate(this.CrossThreadClose); this.Invoke(d, new Object[] { f }); } else { f.Close(); } }