📄 littlealarmclock.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BackColor = &H00400000&
ClientHeight = 4635
ClientLeft = 60
ClientTop = 450
ClientWidth = 6330
FillColor = &H00FFFFFF&
BeginProperty Font
Name = "楷体_GB2312"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF00FF&
LinkTopic = "Form1"
ScaleHeight = 4635
ScaleWidth = 6330
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command4
BackColor = &H0000FF00&
Caption = "OK "
BeginProperty Font
Name = "隶书"
Size = 26.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 2520
Style = 1 'Graphical
TabIndex = 11
Top = 2880
Width = 1095
End
Begin VB.CommandButton Command1
BackColor = &H0000FF00&
Caption = "确定"
Height = 615
Left = 840
Style = 1 'Graphical
TabIndex = 10
Top = 3600
Width = 1095
End
Begin VB.CommandButton Command3
BackColor = &H00808080&
Caption = "退出"
Height = 615
Left = 4200
Style = 1 'Graphical
TabIndex = 9
Top = 3600
Width = 1095
End
Begin VB.CommandButton Command2
BackColor = &H00FF0000&
Caption = "取消"
Height = 615
Left = 2520
Style = 1 'Graphical
TabIndex = 8
Top = 3600
Width = 1095
End
Begin VB.Timer Timer2
Enabled = 0 'False
Interval = 1000
Left = 5760
Top = 2280
End
Begin VB.Timer Timer1
Interval = 1000
Left = 5760
Top = 1440
End
Begin VB.ComboBox C1
BackColor = &H00FFFFFF&
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000C000&
Height = 435
Left = 1920
Style = 2 'Dropdown List
TabIndex = 1
Top = 2280
Width = 1335
End
Begin VB.TextBox T2
Alignment = 2 'Center
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000C000&
Height = 435
Left = 4080
TabIndex = 2
Top = 2280
Width = 855
End
Begin VB.TextBox T1
Alignment = 2 'Center
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000C000&
Height = 495
Left = 1920
TabIndex = 6
Top = 1440
Width = 3015
End
Begin VB.Label Label5
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "时"
ForeColor = &H00FF00FF&
Height = 375
Left = 3360
TabIndex = 7
Top = 2280
Width = 495
End
Begin VB.Label Label4
Alignment = 2 'Center
BackStyle = 0 'Transparent
BeginProperty Font
Name = "楷体_GB2312"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF00FF&
Height = 375
Left = 5040
TabIndex = 5
Top = 2280
Width = 495
WordWrap = -1 'True
End
Begin VB.Label Label3
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "时间定时:"
BeginProperty Font
Name = "楷体_GB2312"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF00FF&
Height = 375
Left = 120
TabIndex = 4
Top = 2280
Width = 1815
WordWrap = -1 'True
End
Begin VB.Label Label2
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "现在时间:"
BeginProperty Font
Name = "楷体_GB2312"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF00FF&
Height = 375
Left = 0
TabIndex = 3
Top = 1440
Width = 1935
WordWrap = -1 'True
End
Begin VB.Label Label1
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "小闹钟"
BeginProperty Font
Name = "楷体_GB2312"
Size = 26.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF00FF&
Height = 615
Left = 2040
TabIndex = 0
Top = 120
Width = 2175
WordWrap = -1 'True
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Timer2.Enabled = True
End Sub
Private Sub Command2_Click()
Timer2.Enabled = False
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Timer1_Timer()
T1.Text = Time$
End Sub
Private Sub Timer2_Timer()
If C1.Text = Left$(T1.Text, 2) Then
Beep
End If
If Val(T2.Text) = Val(Mid$(T1.Text, 4, 2)) Then
MsgBox "您定的时间到了!"
End If
End Sub
Private Sub Form_Load()
Form1.Show
T1.Visible = False
T2.Visible = False
Label1.Visible = False
Label2.Visible = False
Label3.Visible = False
Label4.Visible = False
Label5.Visible = False
Command1.Visible = False
Command2.Visible = False
Command3.Visible = False
C1.Visible = False
Print
Print
Print
Print Tab(7); "为了您的宝贵时间!"
Print Tab(2); "请您设定时间我小闹钟为您提醒!"
End Sub
Private Sub Command4_Click()
T1.Visible = True
T2.Visible = True
Label1.Visible = True
Label2.Visible = True
Label3.Visible = True
Label4.Visible = True
Label5.Visible = True
Command1.Visible = True
Command2.Visible = True
Command3.Visible = True
C1.Visible = True
Command4.Visible = False
Cls
Dim i As Integer
For i = 0 To 24
C1.List(i) = i
Next i
T1.Text = Time$
Label4.Caption = "分"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -