Hello People如何打开userControl并在2秒后关闭并显示另一个表单? c#WinForms
答案 0 :(得分:6)
public void MyFunction()
{
firstForm.ShowDialog();
secondForm.Show();
}
public void firstForm_Load(object sender, EventArgs e)
{
Timer timer = new System.Windows.Forms.Timer() { Interval = 2000 };
timer.Tick += delegate { timer.Stop(); Close(); };
timer.Start();
}