我想在C#VS2012中打开一个winForm。并使用此代码结构来加载表单。我正在尝试查看表单的加载状态我该怎么做。 fm.LoadingStatus() ;是为了表示目的,我将调用哪个函数来显示正确的加载状态。
.
.
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();
}
}
.
.