public static void CloseMessageForm() { if (_frm != null) { if (!_frm.IsDisposed) { MethodInvoker mi = new MethodInvoker(_frm.Close); _frm.Invoke(mi); _frm = null; } } }
private static void createMessageForm() { _frm = new FormWarning(); _frm.Invoke((MethodInvoker)(delegate() { _frm.ShowDialog(); } )); }