📄 frm_play.frm
字号:
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 915
Index = 5
Left = 240
Style = 1 'Graphical
TabIndex = 4
Top = 2040
Width = 1635
End
Begin VB.ComboBox Combo1
Height = 315
Index = 0
Left = 180
TabIndex = 3
Text = "Combo1"
Top = 1320
Width = 1575
End
Begin VB.ComboBox Combo1
Height = 315
Index = 4
Left = 240
TabIndex = 2
Text = "Combo1"
Top = 4800
Width = 1575
End
Begin VB.ComboBox Combo1
Height = 315
Index = 5
Left = 240
TabIndex = 1
Text = "Combo1"
Top = 3060
Width = 1575
End
Begin VB.Label Label3
Appearance = 0 'Flat
BackColor = &H00000000&
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "Palatino Linotype"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Index = 2
Left = 2340
TabIndex = 28
Top = 4500
Width = 1215
End
Begin VB.Label Label3
Appearance = 0 'Flat
BackColor = &H00000000&
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "Palatino Linotype"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Index = 1
Left = 2400
TabIndex = 27
Top = 2820
Width = 1215
End
Begin VB.Label Label2
Appearance = 0 'Flat
BackColor = &H00000000&
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "Palatino Linotype"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Index = 2
Left = 2340
TabIndex = 23
Top = 4140
Width = 1215
End
Begin VB.Label Label2
Appearance = 0 'Flat
BackColor = &H00000000&
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "Palatino Linotype"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Index = 1
Left = 2400
TabIndex = 22
Top = 2460
Width = 1215
End
Begin VB.Label Label1
Appearance = 0 'Flat
BackColor = &H00000000&
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "Palatino Linotype"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Index = 2
Left = 2340
TabIndex = 18
Top = 3780
Width = 1215
End
Begin VB.Label Label1
Appearance = 0 'Flat
BackColor = &H00000000&
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "Palatino Linotype"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Index = 1
Left = 2400
TabIndex = 17
Top = 2100
Width = 1215
End
Begin VB.Label Label3
Appearance = 0 'Flat
BackColor = &H00000000&
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "Palatino Linotype"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Index = 0
Left = 2400
TabIndex = 16
Top = 1020
Width = 1215
End
Begin VB.Label Label2
Appearance = 0 'Flat
BackColor = &H00000000&
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "Palatino Linotype"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Index = 0
Left = 2400
TabIndex = 15
Top = 660
Width = 1215
End
Begin VB.Label Label1
Appearance = 0 'Flat
BackColor = &H00000000&
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "Palatino Linotype"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Index = 0
Left = 2400
TabIndex = 14
Top = 300
Width = 1215
End
End
Begin VB.Label Label4
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H80000005&
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "MS Serif"
Size = 13.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 435
Left = 3120
TabIndex = 32
Top = 5700
Width = 2775
End
End
Attribute VB_Name = "frmplay"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim h As Integer
Dim m As Integer
Dim s As Integer
Private Sub Command1_Click(Index As Integer)
If Command1(Index).BackColor = vbGreen Then
yy = InputBox("Enter time duration for playing (in format hh:mm:ss)...", "Time duration...", "02:00:00")
End If
If Command1(Index).BackColor = vbGreen Then
Command1(Index).BackColor = vbRed
Command1(Index).Caption = "BUSY"
Command1(Index).Enabled = False
Label1((Index)).Caption = Time
Label2((Index)).Caption = yy
Else
Command1(Index).BackColor = vbGreen
Command1(Index).Caption = "FREE TO USE"
End If
h = Hour(yy)
m = Minute(yy)
s = Second(yy)
End Sub
Private Sub Form_ACTIVATE()
Set ADO = New ADODB.Connection
Set RS = New ADODB.Recordset
ADO.CursorLocation = adUseClient
ADO.ConnectionString = "provider = MSDAORA; user id =SCOTT; password =TIGER;"
ADO.Open
RS.Open "games", ADO, adOpenDynamic, adLockOptimistic, adCmdTable
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
Label4.Caption = Time
Label4.AutoSize = True
If Command1(0).Caption = "BUSY" Then
If s = 0 Then
If m = 0 Then
If h = 0 Then
h = 23
Else
h = h - 1
End If
m = 59
Else
m = m - 1
End If
s = 59
Else
s = s - 1
End If
Label3(0).Caption = h & ":" & m & ":" & s
If Label3(0).Caption = "0:0:0" Then
Command1(0).Caption = "FREE TO USE"
Command1(0).BackColor = vbGreen
Command1(0).Enabled = True
Label1(0).Caption = ""
Label2(0).Caption = ""
Label3(0).Caption = ""
MsgBox "console 1 is now free to use...", vbInformation, "free of busy?"
End If
End If
'Label3(Index).Caption = (Val(Label1(Index).Caption) + Val(yy)) - Now
'Else
'Label1(Index).Caption = ""
'Label2(Index).Caption = ""
'Label3(Index).Caption = ""
'End If
'Select Case Command1(Index)
'Case Command1(Index).Caption = "BUSY"
' Label3((Index)).Caption = Val(Label1(Index).Caption) + yy - Time
'Case Command1(Index).Caption = "FREE TO USE"
' Label1((Index)).Caption = ""
' Label2((Index)).Caption = ""
' Label3((Index)).Caption = ""
'End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -