3
我有一個VBScript來提醒用MessageBox的事件,但我希望這會在5秒左右後自動解除。有沒有辦法做到這一點?有沒有辦法讓MessageBox在設定的時間間隔後自動關閉?
我有一個VBScript來提醒用MessageBox的事件,但我希望這會在5秒左右後自動解除。有沒有辦法做到這一點?有沒有辦法讓MessageBox在設定的時間間隔後自動關閉?
使用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的免費文章Mastering the MessageBox。
Google:http://blogs.technet.com/b/heyscriptingguy/archive/2005/03/14/how-can-i-automatically-dismiss-a-message-box-after-a-specified-length -of-time.aspx – Fionnuala 2012-04-20 19:51:29
所以你需要VBA或VBScript? – 2012-04-20 19:56:59