VB在指定时间弹出对话框
2个回答
展开全部
下面的例子是晚上8点弹出对话框
Private Sub Form_Load()
Label1.Caption = Now
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Now
If Right(Label1.Caption, 8) = "18:27:40" Then
MsgBox "时间到"
End If
End Sub
Private Sub Form_Load()
Label1.Caption = Now
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Now
If Right(Label1.Caption, 8) = "18:27:40" Then
MsgBox "时间到"
End If
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Form_Load()
Label1.Caption = Time$
Timer1.Enabled = True
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Time$
DoEvents
If Mid(Time$, 1, 2) = "8" Then MsgBox "yes" Else
End Sub
Label1.Caption = Time$
Timer1.Enabled = True
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Time$
DoEvents
If Mid(Time$, 1, 2) = "8" Then MsgBox "yes" Else
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询