【发布时间】:2012-04-20 19:18:23
【问题描述】:
我有一个 VBScript 来提醒带有 MessageBox 的事件,但我希望它在 5 秒左右后自动关闭。有没有办法做到这一点?
【问题讨论】:
标签: vbscript
我有一个 VBScript 来提醒带有 MessageBox 的事件,但我希望它在 5 秒左右后自动关闭。有没有办法做到这一点?
【问题讨论】:
标签: vbscript
使用 WshShell 对象的 Popup 方法。它有一个超时参数。
intTimeout = 10 'Number of seconds to wait
strMessage = "This is my message box!"
strTitle = "Hello, world!"
Set WshShell = CreateObject("WScript.Shell")
intResult = WshShell.Popup(strMessage, intTimeout, strTitle)
有关更多信息,请查看我关于 ASP Free 的文章 Mastering the MessageBox。 (archive)
【讨论】: