ProgressT = new Thread(ProgressViewTest); ProgressT.IsBackground = true; ProgressT.Start();
void ProgressViewTest() { try { if (frm == null) frm = new Progress(); if (frm.Visible == true) frm.Close(); frm.ShowDialog(); } catch (Exception ex) { if (frm != null) { if (frm.Visible == true) frm.Close(); } } }
Location
Size
Quote:i am not hiding a part of one form behind another form on second form i have used one GIF image to show user to wait for some time, because some process going on at backend. so form 2 (GIF image) call by tread from first form. aand i want to make that form in center of parent.
private void OpenForm(Form parent) { FormLoading frm = new FormLoading(); frm.Parent = parent; frm.StartPosition = FormStartPosition.CenterParent; frm.ShowDialog(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)