VB如何控制弹出多个msgbox的弹出时间(有代码)
http://zhidao.baidu.com/question/494068307.html?quesup2&sort=6#thank怎么去控制它的弹出时间...
http://zhidao.baidu.com/question/494068307.html?quesup2&sort=6#thank
怎么去控制它的弹出时间 展开
怎么去控制它的弹出时间 展开
展开全部
'下面这个未公开的API函数可以实现定时关闭的消息框的功能。
'函数声明:
Private Declare Function MessageBoxTimeout Lib "user32" Alias "MessageBoxTimeoutA" (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As Long, ByVal wlange As Long, ByVal dwTimeout As Long) As Long
'调用示例
Private Sub Command1_Click()
MessageBoxTimeout Me.hwnd, "不管你按不按[确定],三秒后关闭。","带计时功能的消息框",vbInformation, 0, 3000
End Sub
'函数声明:
Private Declare Function MessageBoxTimeout Lib "user32" Alias "MessageBoxTimeoutA" (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As Long, ByVal wlange As Long, ByVal dwTimeout As Long) As Long
'调用示例
Private Sub Command1_Click()
MessageBoxTimeout Me.hwnd, "不管你按不按[确定],三秒后关闭。","带计时功能的消息框",vbInformation, 0, 3000
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Form_Load()
Dim obj As Object, i, t
t = 1
Set obj = CreateObject("Wscript.Shell")
For i = 1 To 3
obj.Popup "第" & i & "个按钮" & t & "s关闭", t, "test"
Next
Unload Me
End Sub
Dim obj As Object, i, t
t = 1
Set obj = CreateObject("Wscript.Shell")
For i = 1 To 3
obj.Popup "第" & i & "个按钮" & t & "s关闭", t, "test"
Next
Unload Me
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询