显示窗体:
try
{
Form loadingform = new loading();
loadingform.StartPosition = FormStartPosition.CenterParent;
loadingform.ShowDialog();
}
catch
{
}
{
Form loadingform = new loading();
loadingform.StartPosition = FormStartPosition.CenterParent;
loadingform.ShowDialog();
}
catch
{
}
关闭窗体:
Application.OpenForms["loadingform"].Close();
参考
http://msdn.microsoft.com/zh-cn/library/system.windows.forms.application.openforms(VS.80).aspx