自动关闭的messagebox
代码语言:javascript复制Form msg = new Form();
Task.Run(new Action(() =>
{
Thread.Sleep(4000);
Invoke(new Action(() =>
{
msg.Close();
}));
}));
MessageBox.Show(msg,ex.Message);
Form msg = new Form();
Task.Run(new Action(() =>
{
Thread.Sleep(4000);
Invoke(new Action(() =>
{
msg.Close();
}));
}));
MessageBox.Show(msg,ex.Message);