Dim s As String
Private Sub combo4_change()
Label10.Caption = Combo4.Text
End Sub
Private Sub Command1_Click()
Label10.Caption = Combo4.Text
If Combo1.Text = "" Or Combo2.Text = "" Or Label10.Caption = "" Or Combo3.Text = "" Then
ret_val = MsgBox("请输入完整信息,不然我没法提醒你什么时候干什么。", vbExclamation + vbOKOnly + vbSystemModal, "守时小助手")
If ret_val = 1 Then
Command4.Enabled = False
End If
Else
Label7.Caption = Combo1.Text & "点" & Combo2.Text & "分" & Combo3.Text & "秒"
s = Label10.Caption
ret_val = MsgBox("你确定的设置是正确的么?请注意时间制式为24小时制,时间设置不对,将无法及时提醒!", vbExclamation + vbOKCancel + vbSystemModal, "守时小助手")
If ret_val = 2 Then
Combo1.Text = ""
Combo2.Text = ""
Combo3.Text = ""
Label10.Caption = ""
Label7.Caption = ""
Else
Command4.Enabled = True
Command2.Enabled = True
End If
End If
End Sub
Private Sub Command2_Click()
Combo1.Text = ""
Combo2.Text = ""
Combo3.Text = ""
Label10.Caption = ""
Label7.Caption = ""
Command4.Enabled = False
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Command4_Click()
Form1.Hide
End Sub
Private Sub Form_Load()
Label9.Caption = Date
Label2.Caption = Time
Command2.Enabled = False
End Sub
Private Sub Timer1_Timer()
Label9.Caption = Date
Label2.Caption = Time
If Time = Combo1.Text & ":" & Combo2.Text & ":" & Combo3.Text Then
msg = "你好!我要提醒你," & "你告诉我:“" & s & "”"
Style = vbExclamation + vbOKOnly + vbSystemModal
Title = "守时小用助手提醒你了!"
ret_val = MsgBox(msg, Style, Title)
If trt_val = 1 Then
Form1.Show
End If
End If
End Sub