【发布时间】:2012-12-25 03:38:58
【问题描述】:
我有以下代码...
MessageBox.Show("Your session has been remotely terminated.");
Application.ExitThread;
我想弄清楚如果用户没有点击“确定”按钮,是否有办法在短时间内自动关闭 MessageBox。
【问题讨论】:
-
你试过'MessageBox.Show("blah", timeout)'了吗?
-
您可以使用此代码,减去 BeginInvoke hack。从计时器的 Tick 事件中调用它。 stackoverflow.com/a/12555069/17034
标签: c# exit messagebox