健康提醒器,在网络中打理生活
科技生活中的健康提醒:定期更新软件和设备以保障网络安全 #生活知识# #科技生活# #科技健康解读#
Private Sub Check1_Click()
If Check1.Value = 1 Then
h.Enabled = True
m.Enabled = True
s.Enabled = True
End If
If Check1.Value = 0 Then
h = 0
m = 0
s = 0
h.Enabled = False
m.Enabled = False
s.Enabled = False
End If
End Sub
Private Sub Check2_Click()
If Check2.Value = 1 Then
h2.Enabled = True
m2.Enabled = True
s2.Enabled = True
End If
If Check2.Value = 0 Then
h2 = 0
m2 = 0
s2 = 0
h2.Enabled = False
m2.Enabled = False
s2.Enabled = False
End If
End Sub
Private Sub Check3_Click()
If Check3.Value = 1 Then
h3.Enabled = True
m3.Enabled = True
s3.Enabled = True
End If
If Check3.Value = 0 Then
h3 = 0
m3 = 0
s3 = 0
h3.Enabled = False
m3.Enabled = False
s3.Enabled = False
End If
End Sub
Private Sub Command1_Click()
If Timer1.Enabled = False And Timer2.Enabled = False And Timer3.Enabled = False Then
Time1 = h
Time2 = m
Time3 = s
Time4 = h2
Time5 = m2
Time6 = s2
Time7 = h3
Time8 = m3
Time9 = s3
Call Timesave
Else
MsgBox "正在计时中,无法进行保存", vbExclamation + vbOKOnly, "出错"
End If
End Sub
Private Sub Command2_Click()
Text1.Text = "开"
End Sub
Private Sub Command3_Click()
Form5.Show
End Sub
Private Sub Command4_Click()
If m.Enabled = True Then
h = 0
m = 30
s = 0
Else
MsgBox "喝水一栏未打勾"
End If
If h2.Enabled = True Then
h2 = 1
m2 = 0
s2 = 0
Else
MsgBox "远眺一栏未打勾"
End If
If h3.Enabled = True Then
h3 = 2
m3 = 0
s3 = 0
Else
MsgBox "厕所一栏未打勾"
End If
End Sub
Private Sub Form_Load()
Call Timeread
h = Time1
m = Time2
s = Time3
h2 = Time4
m2 = Time5
s2 = Time6
h3 = Time7
m3 = Time8
s3 = Time9
Timer4.Enabled = False
Timer1.Enabled = False
h.Enabled = False
m.Enabled = False
s.Enabled = False
Timer2.Enabled = False
h2.Enabled = False
m2.Enabled = False
s2.Enabled = False
Timer3.Enabled = False
h3.Enabled = False
m3.Enabled = False
s3.Enabled = False
End Sub
Private Sub h_KeyPress(KeyAscii As Integer)
If (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 8 Then KeyAscii = 0
End Sub
Private Sub h2_KeyPress(KeyAscii As Integer)
If (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 8 Then KeyAscii = 0
End Sub
Private Sub h3_KeyPress(KeyAscii As Integer)
If (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 8 Then KeyAscii = 0
End Sub
Private Sub Label8_DblClick()
Text1.Text = "关"
End Sub
Private Sub m_KeyPress(KeyAscii As Integer)
If (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 8 Then KeyAscii = 0
End Sub
Private Sub m2_KeyPress(KeyAscii As Integer)
If (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 8 Then KeyAscii = 0
End Sub
Private Sub m3_KeyPress(KeyAscii As Integer)
If (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 8 Then KeyAscii = 0
End Sub
Private Sub s_KeyPress(KeyAscii As Integer)
If (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 8 Then KeyAscii = 0
End Sub
Private Sub s2_KeyPress(KeyAscii As Integer)
If (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 8 Then KeyAscii = 0
End Sub
Private Sub s3_KeyPress(KeyAscii As Integer)
If (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 8 Then KeyAscii = 0
End Sub
Private Sub Label2_Click()
If Check1.Value = 0 And Check2.Value = 0 And Check3.Value = 0 Then
MsgBox "您尚未选择一栏进行计时!"
End If
If h.Enabled = True Then
If h = 0 And m = 0 And s = 0 Then
Timer1.Enabled = False
Else
Timer1.Enabled = Not (Timer1.Enabled)
End If
If Timer1.Enabled = Ture Then
h.Locked = Ture: m.Locked = Ture: s.Locked = Ture
Else
h.Locked = False: m.Locked = False: s.Locked = False
End If
Else
End If
If h2.Enabled = True Then
If h2 = 0 And m2 = 0 And s2 = 0 Then
Timer2.Enabled = False
Else
Timer2.Enabled = Not (Timer2.Enabled)
End If
If Timer2.Enabled = Ture Then
h2.Locked = Ture: m2.Locked = Ture: s2.Locked = Ture
Else
h2.Locked = False: m2.Locked = False: s2.Locked = False
End If
Else
End If
If h3.Enabled = True Then
If h3 = 0 And m3 = 0 And s3 = 0 Then
Timer3.Enabled = False
Else
Timer3.Enabled = Not (Timer3.Enabled)
End If
If Timer3.Enabled = Ture Then
h3.Locked = Ture: m3.Locked = Ture: s3.Locked = Ture
Else
h3.Locked = False: m3.Locked = False: s3.Locked = False
End If
Else
End If
End Sub
Private Sub h_LostFocus()
h = Int(Val(h))
If h < 0 Then h = 0
If h > 23 Then h = 23
End Sub
Private Sub m_LostFocus()
m = Int(Val(m))
If m < 0 Then m = 0
If m > 59 Then m = 59
End Sub
Private Sub s_LostFocus()
s = Int(Val(s))
If s < 0 Then s = 0
If s > 59 Then s = 59
End Sub
Private Sub h2_LostFocus()
h2 = Int(Val(h2))
If h2 < 0 Then h2 = 0
If h2 > 23 Then h2 = 23
End Sub
Private Sub m2_LostFocus()
m2 = Int(Val(m2))
If m2 < 0 Then m2 = 0
If m2 > 59 Then m2 = 59
End Sub
Private Sub s2_LostFocus()
s = Int(Val(s))
If s2 < 0 Then s2 = 0
If s2 > 59 Then s2 = 59
End Sub
Private Sub h3_LostFocus()
h3 = Int(Val(h3))
If h3 < 0 Then h3 = 0
If h3 > 23 Then h3 = 23
End Sub
Private Sub m3_LostFocus()
m3 = Int(Val(m3))
If m3 < 0 Then m3 = 0
If m3 > 59 Then m3 = 59
End Sub
Private Sub s3_LostFocus()
s3 = Int(Val(s3))
If s3 < 0 Then s3 = 0
If s3 > 59 Then s3 = 59
End Sub
Private Sub Timer1_Timer()
If Timer1.Enabled = True Then
h.Enabled = False
m.Enabled = False
s.Enabled = False
End If
If h = 0 And m = 0 And s = 0 Then
Timer1.Enabled = False
Form2.Show
Check1.Value = 0
ElseIf s = 0 Then
s = 59
If m = 0 Then
m = 59: h = h - 1
Else
m = m - 1
End If
Else
s = s - 1
End If
End Sub
Private Sub Timer2_Timer()
If Timer2.Enabled = True Then
h2.Enabled = False
m2.Enabled = False
s2.Enabled = False
End If
If h2 = 0 And m2 = 0 And s2 = 0 Then
Timer2.Enabled = False
Form3.Show
Check2.Value = 0
ElseIf s2 = 0 Then
s2 = 59
If m2 = 0 Then
m2 = 59: h2 = h2 - 1
Else
m2 = m2 - 1
End If
Else
s2 = s2 - 1
End If
End Sub
Private Sub Timer3_Timer()
If Timer3.Enabled = True Then
h3.Enabled = False
m3.Enabled = False
s3.Enabled = False
End If
If h3 = 0 And m3 = 0 And s3 = 0 Then
Timer3.Enabled = False
Form4.Show
Check3.Value = 0
ElseIf s3 = 0 Then
s3 = 59
If m3 = 0 Then
m3 = 59: h3 = h3 - 1
Else
m3 = m3 - 1
End If
Else
s3 = s3 - 1
End If
End Sub
Private Sub Timer4_Timer()
Beep
End Sub
网址:健康提醒器,在网络中打理生活 https://www.yuejiaxmz.com/news/view/179009
相关内容
预防网络沉迷 守护健康心灵 淮滨县张庄中学预防沉迷网络不仅是网络中心 智我打造家庭生活管家
论网络时代的大学生心理健康教育
第九章网络生活与心理健康.ppt文档全文免费阅读、在线看
家居生活10个健康小提醒
【心理疏导】网络文明,你我同行
给未成年人一个健康的网络空间
专家提醒建立健康生活方式 远离心梗威胁
个人在网络生活中,面对常见的网络安全问题该如何防范?(最全问答)
智能化家居中的健康生活理念解析