7,763
社区成员
发帖
与我相关
我的任务
分享
Dim WsShell As Object
Set WsShell = CreateObject("Wscript.Shell ")
WsShell.Popup "你还在上网吗?", 1, "温馨提示 "
Private Declare Function MessageBoxTimeout Lib "user32" Alias "MessageBoxTimeoutA" (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As VbMsgBoxStyle, ByVal wlange As Long, ByVal dwTimeout As Long) As Long
Private Sub Command1_Click()
MessageBoxTimeout Me.hwnd, "Hello World", "Tips", vbExclamation, 0, 3000
End Sub
'3秒后自动关闭msgbox 3000 3秒可自行设置
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, "Hello World", "Tips", vbInformation, 0, 3000
End Sub
Private Sub Command1_Click()
Timer1.Enabled = True
MsgBox "xxx"
Timer1.Enabled = False
End Sub
Private Sub Form_Load()
Timer1.Interval = 2000
End Sub
Private Sub Timer1_Timer()
Timer1.Enabled = False
SendKeys "{ENTER}"
End Sub