form1.frm
来自「征途BOSS计时及各职业技能书查询小程序」· FRM 代码 · 共 104 行
FRM
104 行
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 2865
ClientLeft = 60
ClientTop = 345
ClientWidth = 8835
LinkTopic = "Form1"
ScaleHeight = 2865
ScaleWidth = 8835
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "Start"
Height = 375
Left = 4440
TabIndex = 5
Top = 1200
Width = 1575
End
Begin VB.Timer Timer1
Interval = 1000
Left = 480
Top = 1680
End
Begin VB.CommandButton Command1
Caption = "Show Time"
Height = 375
Left = 6720
TabIndex = 2
Top = 1200
Width = 1095
End
Begin VB.TextBox Text2
Height = 375
Left = 5880
TabIndex = 1
Text = "Text1"
Top = 240
Width = 2295
End
Begin VB.TextBox Text1
Height = 375
Left = 1680
TabIndex = 0
Text = "Text1"
Top = 240
Width = 2295
End
Begin VB.Label Label3
Caption = "Label3"
Height = 735
Left = 1680
TabIndex = 6
Top = 1800
Width = 4215
End
Begin VB.Label Label2
Caption = "TimeAgain"
Height = 255
Left = 4560
TabIndex = 4
Top = 240
Width = 975
End
Begin VB.Label Label1
Caption = "TimeKilled"
Height = 255
Left = 480
TabIndex = 3
Top = 360
Width = 975
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()
Text2.Text = Format(Time, "hh") + 2 & ":" & Format(Time, "nn") & ":" & Format(Time, "ss")
End Sub
Private Sub Form_Load()
Text1 = Time
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
'Count down loop
Timer1.Enabled = False
If ((Format$(Time, "hh") + 2) & ":" & Format$(Time, "nn") & ":" & Format$(Time, "ss")) <> Text2.Text Then 'Counter to continue loop until 0
Time = DateAdd("s", 1, Time)
Label3.Visible = False
Label3.Caption = Format$(Time, "hh") & ":" & Format$(Time, "nn") & ":" & Format$(Time, "ss")
Label3.Visible = True
Timer1.Enabled = True
Else
'Turn off timer, set off alarm, and enable reset.
Timer1.Enabled = False
Beep
Beep
End If
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?