I am trying to open a winForm in C# VS2012. and using this code structure for loading form. I am trying to see the loading status of form How can I do it.fm.LoadingStatus(); is for notation purpose which function i will call to show the correct loading status.
.
.
formOpen = Application.OpenForms["student"];
if (formOpen == null)
{
fm = new student();
fm.TopLevel = false;
fm.Parent = this.panel1;
fn.Show(); //I want to show this progress in loaging bar
int i=0;
progressBar1.Visible = true;
progressBar1.Value = 0;
progressBar1.Minimum = 0;
progressBar1.Maximum = ***fm.LoadingStatus()***;
progressBar1.Step = 100;
for (i = 0; i <= 100; i++)
{
progressBar1.PerformStep();
}
}
.
.