public static void HideMe(Form owner) { owner.UseWaitCursor = false; owner.Enabled = true; if (_Instance != null) { _Instance.Close(); _Instance = null; } Application.DoEvents(); }
public static void ShowMe(Form owner, string message) { owner.UseWaitCursor = true; if (_Instance == null || _Instance.IsDisposed) { _Instance = new frmWaiting(); } _Instance.Owner = owner; _Instance.lblMsg.Text = String.IsNullOrEmpty(message) ? _Instance.lblMsg.Text : message; _Instance.lblMsg.Invalidate(); _Instance.Show(); Application.DoEvents(); }
private void frmWaiting_FormClosed(object sender, FormClosedEventArgs e) { _Instance = null; }