This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / help:在DOT NET 里,如何打开另外一个窗体同时把自身的窗体关掉?I have 3 files:
- Startup.cs - the startup class that contains the Main method
- frmRegister.cs - the login form
- frmMain.cs - the main form
In Startup.cs:
static void Main()
{
Application.Run(new frmRegister());
}
In frmRegister.cs:
private void btnOk_Click(object sender, System.EventArgs e)
{
frmMain objFormMain = new frmMain();
objFormMain.ShowDialog();
this.Close();
}
上边的代码不起作用,如何修改.
-bobo123(bobo);
2004-11-9
{449}
(#1972833@0)
-
objFormMain.ShowDialog(); ===> objFormMain.Show();
-guestagain(guest again);
2004-11-9
(#1973379@0)
-
sorry,objFormMain.Show(); ===> objFormMain.ShowDialog();
-bobo123(bobo);
2004-11-9
(#1973432@0)
-
what do you mean?
-guestagain(guest again);
2004-11-9
(#1973477@0)