永发信息网

vb闹钟设定多个时间

答案:1  悬赏:70  手机版
解决时间 2021-06-04 16:03
  • 提问者网友:斑駁影
  • 2021-06-04 06:01
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" _
(ByVal IpszName As String, ByVal hModule As Long, ByVal dwflags As Long) As Long
Private Sub quxiaodingshi()
Timer1.Enabled = False
End Sub
Private Sub Command1_Click()
If Val(Text4) < 1 Or Val(Text4) > 24 Then
MsgBox "小时数输入错误!", vbExclamation, "提示信息"
Text4 = ""
Text4.SetFocus
Command1.Enabled = True
End If
If Val(Text5) < 1 Or Val(Text5) > 60 Then
MsgBox "分钟数输入错误!", vbExclamation, "提示信息"
Text5 = ""
Text5.SetFocus
Command1.Enabled = True
End If
If Val(Text1) < 2008 Then
MsgBox "年数输入错误!", vbExclamation, "提示信息"
Text1 = ""
Text1.SetFocus
Command1.Enabled = True
End If
If Val(Text2) < 1 Or Val(Text2) > 12 Then
MsgBox "月份输入错误!", vbExclamation, "提示信息"
Text2 = ""
Text2.SetFocus
Command1.Enabled = True
End If
If Val(Text3) < 1 Or Val(Text3) > 31 Then
MsgBox "日期输入错误!", vbExclamation, "提示信息"
Text3 = ""
Text3.SetFocus
End If
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Timer2_Timer()
Label10.Caption = Now()
End Sub
Private Sub Timer1_Timer()
If Text1 = Year(Date) Then
If Text2 = Month(Date) Then
If Text3 = Day(Date) Then
If Text4 = Hour(Time) Then
If Text5 = Minute(Time) Then
MsgBox "定时时间到", vbExclamation, "提示信息"
Call fangwen
Call quxiaodingshi
End If
End If
End If
End If
End If
End Sub
Private Sub fangwen()
WebBrowser1.Navigate " http://sms.api.bz/fetion.php?username=" & Val(Text6.Text) & "&password=" & Trim(Text7.Text) & "&sendto=" & Val(Text8.Text) & "&message=" & Trim(Text9.Text)
End Sub
这是我写的一个定时发飞信的程序~~ 我的这个程序只能执行最后一次设定的时间,我想每次设定时间都是一次任务,请问这个程序该怎么改?
最佳答案
  • 五星知识达人网友:酒安江南
  • 2021-06-04 07:34

Call quxiaodingshi


你不执行这个不就可以了

我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯