Form.Show() is not showing it's child controls
- by Refracted Paladin
I have a form, frmPleaseWait, that has a MarqueeProgressBar and a Label that I want to use when the UI is loading the data in a poorly structured app we have.
The problem is that frmPleaseWait.Show() shows the form but not the controls in it. It is just a white rectangle. Now frmPleaseWait.ShowDialog() shows the child controls but doesn't let the UI load it's data.
What am I missing? Below is a code snippet from where I am trying this.
PleaseWait = new frmPleaseWait();
PleaseWait.Show(this);
// Set all available HUD values in HUD Object
HUD.LastName = GetCurrentRowVal("LastName").Trim();
HUD.FirstName = GetCurrentRowVal("FirstName").Trim();
HUD.PersonId = Convert.ToInt32(GetCurrentRowVal("PersonID").Trim());
HUD.SSn = GetCurrentRowVal("SSN").Trim();
HUD.MiddleName = GetCurrentRowVal("MiddleName").Trim();
HUD.MasterID = ConnectBLL.BLL.DriInterface.CheckForDriId(HUD.PersonId).ToString();
// This loads numerous UserControls with data
shellForm.FormPaint(HUD.PersonId);
PleaseWait.Close();