📄 frmlight.frm
字号:
VERSION 5.00
Begin VB.Form FrmLight
Caption = "灯光控制"
ClientHeight = 3510
ClientLeft = 60
ClientTop = 450
ClientWidth = 5115
LinkTopic = "Form1"
LockControls = -1 'True
ScaleHeight = 3510
ScaleWidth = 5115
StartUpPosition = 3 '窗口缺省
Visible = 0 'False
Begin VB.CommandButton CmdCancel
Caption = "取消"
Height = 495
Left = 2880
TabIndex = 13
Top = 2640
Width = 1215
End
Begin VB.CommandButton CmdSubmit
Caption = "确定"
Height = 495
Left = 840
TabIndex = 12
Top = 2640
Width = 1215
End
Begin VB.CommandButton CmdLight
Caption = "S"
Height = 495
Index = 5
Left = 3960
TabIndex = 5
Top = 840
Width = 495
End
Begin VB.CommandButton CmdLight
Caption = "S"
Height = 495
Index = 4
Left = 3240
TabIndex = 4
Top = 840
Width = 495
End
Begin VB.CommandButton CmdLight
Caption = "S"
Height = 495
Index = 3
Left = 2520
TabIndex = 3
Top = 840
Width = 495
End
Begin VB.CommandButton CmdLight
Caption = "S"
Height = 495
Index = 2
Left = 1800
TabIndex = 2
Top = 840
Width = 495
End
Begin VB.CommandButton CmdLight
Caption = "S"
Height = 495
Index = 1
Left = 1080
TabIndex = 1
Top = 840
Width = 495
End
Begin VB.CommandButton CmdLight
Caption = "S"
Height = 495
Index = 0
Left = 360
TabIndex = 0
Top = 840
Width = 495
End
Begin VB.Label LblLight
Height = 495
Index = 5
Left = 3960
TabIndex = 11
Top = 1680
Width = 495
End
Begin VB.Label LblLight
Height = 495
Index = 4
Left = 3240
TabIndex = 10
Top = 1680
Width = 495
End
Begin VB.Label LblLight
Height = 495
Index = 3
Left = 2520
TabIndex = 9
Top = 1680
Width = 495
End
Begin VB.Label LblLight
Height = 495
Index = 2
Left = 1800
TabIndex = 8
Top = 1680
Width = 495
End
Begin VB.Label LblLight
Height = 495
Index = 1
Left = 1080
TabIndex = 7
Top = 1680
Width = 495
End
Begin VB.Label LblLight
Height = 495
Index = 0
Left = 360
TabIndex = 6
Top = 1680
Width = 495
End
End
Attribute VB_Name = "FrmLight"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public Light As Byte
Private Sub CmdCancel_Click()
g_Cancel = True
Unload Me
End Sub
Private Sub CmdLight_Click(Index As Integer)
If LblLight(Index).Caption = "ON" Then
LblLight(Index).Caption = "OFF"
Else
LblLight(Index).Caption = "ON"
End If
End Sub
Private Sub CmdSubmit_Click()
Dim i, j As Byte
Light = 0
For i = 0 To 5
If LblLight(i) = "ON" Then
Light = Light + 2 ^ i
End If
Next i
g_Cancel = False
Unload Me
End Sub
Private Sub Form_Load()
Dim i, j As Byte
For i = 0 To 5
LblLight(i).Caption = "ON"
Next i
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -