📄 form4.frm
字号:
VERSION 5.00
Begin VB.Form Form4
BorderStyle = 1 'Fixed Single
Caption = "最后陈述阶段"
ClientHeight = 8385
ClientLeft = 2280
ClientTop = 1560
ClientWidth = 11835
Icon = "Form4.frx":0000
LinkTopic = "Form4"
MaxButton = 0 'False
ScaleHeight = 8385
ScaleWidth = 11835
Begin VB.TextBox Text3
Alignment = 2 'Center
BeginProperty Font
Name = "宋体"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 450
Left = 4560
MultiLine = -1 'True
TabIndex = 8
Text = "Form4.frx":038A
Top = 7680
Width = 615
End
Begin VB.TextBox Text2
Alignment = 2 'Center
BeginProperty Font
Name = "宋体"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 450
Left = 3600
MultiLine = -1 'True
TabIndex = 7
Text = "Form4.frx":038F
Top = 7680
Width = 615
End
Begin VB.PictureBox Picture2
Height = 7215
Left = 1200
Picture = "Form4.frx":0394
ScaleHeight = 7155
ScaleWidth = 10515
TabIndex = 5
Top = 0
Width = 10575
Begin VB.Label Label7
BackStyle = 0 'Transparent
Caption = "分钟"
BeginProperty Font
Name = "宋体"
Size = 36
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 6960
TabIndex = 15
Top = 600
Width = 1695
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "最后陈述阶段"
BeginProperty Font
Name = "宋体"
Size = 36
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 855
Left = 240
TabIndex = 14
Top = 600
Width = 4695
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "剩余时间 :"
BeginProperty Font
Name = "宋体"
Size = 42
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1215
Left = 720
TabIndex = 13
Top = 1680
Width = 5415
End
Begin VB.Label Label6
BackColor = &H0000FF00&
Caption = "00:00"
BeginProperty Font
Name = "宋体"
Size = 36
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 735
Left = 4800
TabIndex = 12
Top = 600
Width = 1935
End
Begin VB.Label Label8
BackColor = &H0000FFFF&
Caption = "00:00"
BeginProperty Font
Name = "宋体"
Size = 72
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 1575
Left = 3360
TabIndex = 6
Top = 3120
Width = 3855
End
End
Begin VB.PictureBox Picture1
Height = 1215
Left = 0
Picture = "Form4.frx":1BE4A
ScaleHeight = 1155
ScaleWidth = 1155
TabIndex = 4
Top = 7200
Width = 1215
End
Begin VB.Timer Timer2
Enabled = 0 'False
Left = 720
Top = 120
End
Begin VB.CommandButton Command6
Caption = "暂停"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 3
Top = 4680
Width = 975
End
Begin VB.CommandButton Command5
Caption = "返 回 主 界 面"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 120
TabIndex = 2
Top = 5880
Width = 975
End
Begin VB.Timer Timer1
Enabled = 0 'False
Left = 120
Top = 120
End
Begin VB.CommandButton Command4
Caption = "交替"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 1
Top = 5280
Width = 975
End
Begin VB.CommandButton Command2
Caption = "开始计时"
Height = 375
Left = 120
TabIndex = 0
Top = 4080
Width = 975
End
Begin VB.Label Label4
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "秒"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5160
TabIndex = 11
Top = 7740
Width = 375
End
Begin VB.Label Label5
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "分"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4200
TabIndex = 10
Top = 7740
Width = 375
End
Begin VB.Label Label14
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "设定时间"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2040
TabIndex = 9
Top = 7740
Width = 1455
End
Begin VB.Line Line1
BorderColor = &H8000000E&
X1 = 1200
X2 = 1200
Y1 = 0
Y2 = 6960
End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Minutes As Integer
Dim Seconds As Integer
Dim Time As Date
Private Sub Mydisplay()
Minutes = Val(Text2.Text)
Seconds = Val(Text3.Text)
Time = TimeSerial(Hours, Minutes, Seconds)
Label8.Caption = Format$(Time, "nn") & ":" & Format$(Time, "ss")
Label6.Caption = Text2.Text & ":" & Text3.Text
End Sub
Private Sub Command2_Click() '开始计时
If Minutes = 0 Then '检查时间是否有效
If Seconds = 0 Then
MsgBox ("您还没有设定辩论时间,请在下面输入时间,并点击<确定>。")
End If
Else
End If
Timer1.Enabled = True
Timer2.Enabled = False
Command4.Enabled = True
Command2.Enabled = True
Command6.Enabled = True
End Sub
Private Sub Text2_Change()
Mydisplay
End Sub
Private Sub Text3_Change()
Mydisplay
End Sub
Private Sub Command4_Click() '交替
Minutes = Val(Text2.Text)
Seconds = Val(Text3.Text)
Time = TimeSerial(Hours, Minutes, Seconds)
If Timer1 = True Then
Timer2 = True
Timer1 = False
Else
Timer2 = False
Timer1 = True
End If
Command2.Enabled = True
Command6.Enabled = True
Command4.Enabled = True
End Sub
Private Sub Command5_Click()
Unload Me
Form1.Show
End Sub
Private Sub Command6_Click() '暂停
Timer1.Enabled = False
Timer2.Enabled = False
Command4.Enabled = True '复位有效
Command2.Enabled = True '开始计时有效
End Sub
Private Sub Form_Load()
Timer1.Interval = 1000
Timer2.Interval = 1000
Minutes = 0
Seconds = 0
Time = 0
Text2.Text = "00" '分钟
Text3.Text = "00" '秒
Command2.Enabled = True '开始有效
Command4.Enabled = False '复位无效
Command6.Enabled = False '暂停无效
End Sub
Private Sub Timer1_Timer() '正方剩余时间
If (Format$(Time, "nn") & ":" & Format$(Time, "ss")) < "00:12" Then
i = sndPlaySound(App.Path & "/ri.wav", 1)
End If
Timer1.Enabled = False
If (Format$(Time, "nn") & ":" & Format$(Time, "ss")) <> "00:00" Then
Time = DateAdd("s", -1, Time)
Label8.Visible = False
Label8.Caption = Format$(Time, "nn") & ":" & Format$(Time, "ss")
Label8.Visible = True
Timer1.Enabled = True
Else
Timer1.Enabled = False
Beep
Beep
Command4.Enabled = True
End If
End Sub
Private Sub Timer2_Timer() '反方剩余时间
If (Format$(Time, "nn") & ":" & Format$(Time, "ss")) < "00:12" Then
i = sndPlaySound(App.Path & "/ri.wav", 1)
End If
Timer2.Enabled = False
If (Format$(Time, "nn") & ":" & Format$(Time, "ss")) <> "00:00" Then
Time = DateAdd("s", -1, Time)
Label8.Visible = False
Label8.Caption = Format$(Time, "nn") & ":" & Format$(Time, "ss")
Label8.Visible = True
Timer2.Enabled = True
Else
Timer2.Enabled = False
Beep
Beep
Command4.Enabled = True
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -