📄 frmcode.frm
字号:
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 25
Left = 1680
TabIndex = 58
Top = 2565
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 24
Left = 200
TabIndex = 57
Top = 2565
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 23
Left = 4620
TabIndex = 56
Top = 2205
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 22
Left = 3120
TabIndex = 55
Top = 2205
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 21
Left = 1680
TabIndex = 54
Top = 2205
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 20
Left = 200
TabIndex = 53
Top = 2205
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 19
Left = 4620
TabIndex = 52
Top = 1845
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 18
Left = 3120
TabIndex = 51
Top = 1845
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 17
Left = 1680
TabIndex = 50
Top = 1845
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 16
Left = 200
TabIndex = 49
Top = 1845
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 15
Left = 4620
TabIndex = 48
Top = 1485
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 14
Left = 3120
TabIndex = 47
Top = 1485
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 13
Left = 1680
TabIndex = 46
Top = 1485
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 12
Left = 200
TabIndex = 45
Top = 1485
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 11
Left = 4620
TabIndex = 44
Top = 1125
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 10
Left = 3120
TabIndex = 43
Top = 1125
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 9
Left = 1680
TabIndex = 42
Top = 1125
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 8
Left = 200
TabIndex = 41
Top = 1125
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 7
Left = 4620
TabIndex = 40
Top = 765
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 6
Left = 3120
TabIndex = 39
Top = 765
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 5
Left = 1680
TabIndex = 38
Top = 765
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 4
Left = 200
TabIndex = 37
Top = 765
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 3
Left = 4620
TabIndex = 36
Top = 405
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 2
Left = 3120
TabIndex = 35
Top = 405
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 1
Left = 1680
TabIndex = 34
Top = 405
Width = 135
End
Begin VB.Label labCodeYuntai
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "1:"
Height = 195
Index = 0
Left = 200
TabIndex = 33
Top = 405
Width = 135
End
End
End
Attribute VB_Name = "frmCode"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'**************************************
'声明:
'**************************************
Option Explicit
'*****************************
'定义指令集和云台状态集
'*****************************
Private ByteCodeChoose(32) As Byte '云台选择指令集
Private ByteCodeAct(5) As Byte '状态控制指令集
Private ByteCodeMir(6) As Byte '镜头控制指令集
Private ByteCodeStatus(3) As Byte '状态控制指令集
Private ByteStatus(32, 2) As Byte '所有云台的状态集合
'******************************
'其它
'******************************
Public UserResult As VbMsgBoxResult '用户选择
Private beInitialized As Boolean '是否被始化
'******************************
'声明结束
'******************************
'*************************************
'功能:获取本模块内的指令集数据
'*************************************
Public Sub GetCodeData(ByRef CodeChoose() As Byte, ByRef CodeAct() As Byte, ByRef CodeMir() As Byte, ByRef CodeStatus() As Byte)
Dim i As Integer
For i = 1 To 32
CodeChoose(i) = ByteCodeChoose(i - 1)
Next i
For i = 0 To 4
CodeAct(i) = ByteCodeAct(i)
Next i
For i = 0 To 5
CodeMir(i) = ByteCodeMir(i)
Next i
For i = 0 To 2
CodeStatus(i) = ByteCodeStatus(i)
Next i
End Sub
'***************************************
'功能:设置本模块内的指令集数据
'***************************************
Public Sub SetInitData(CodeChoose() As Byte, CodeAct() As Byte, CodeMir() As Byte, CodeStatus() As Byte)
Dim i As Integer
beInitialized = True
For i = 0 To 31
ByteCodeChoose(i) = CodeChoose(i + 1)
Next i
For i = 0 To 4
ByteCodeAct(i) = CodeAct(i)
Next i
For i = 0 To 5
ByteCodeMir(i) = CodeMir(i)
Next i
For i = 0 To 2
ByteCodeStatus(i) = CodeStatus(i)
Next i
End Sub
'********************************************
'功能:应用本模块中当前的指令集来显示到窗体的各控件中
'********************************************
Private Sub UseInitData()
Dim i As Integer
For i = 0 To 31
txtCodeYuntai(i).MaxLength = 8
txtCodeYuntai(i).Text = CBin(ByteCodeChoose(i))
Next i
For i = 0 To 4
txtCodeAct(i).MaxLength = 8
txtCodeAct(i).Text = CBin(ByteCodeAct(i))
Next i
For i = 0 To 5
txtCodeMir(i).MaxLength = 8
txtCodeMir(i).Text = CBin(ByteCodeMir(i))
Next i
For i = 0 To 2
txtCodeMir(i).MaxLength = 8
txtCodeStatus(i) = CBin(ByteCodeStatus(i))
Next i
End Sub
'***********************************************
'从窗体的各控件中读取数据存放到本模块的指令集中
'************************************************
Private Sub SaveData()
Dim i As Integer
For i = 0 To 31
ByteCodeChoose(i) = CDecFromBin(txtCodeYuntai(i).Text)
Next i
For i = 0 To 4
ByteCodeAct(i) = CDecFromBin(txtCodeAct(i).Text)
Next i
For i = 0 To 5
ByteCodeMir(i) = CDecFromBin(txtCodeMir(i).Text)
Next i
For i = 0 To 2
ByteCodeStatus(i) = CDecFromBin(txtCodeStatus(i).Text)
Next i
End Sub
Private Sub cmdCancel_Click()
UserResult = vbCancel
Unload Me
End Sub
Private Sub cmdOK_Click()
SaveData
UserResult = vbOK
Unload Me
End Sub
Private Sub Form_Load()
'设置云台控制代码标签值
beInitialized = False
'设置静态文本框文本
SetlabIndex
'显示当前指令设置
UseInitData
End Sub
'***************************************
'设置静态文本框文本
'****************************************
Private Sub SetlabIndex()
Dim i As Integer
For i = 0 To 31
labCodeYuntai(i).Caption = i + 1
Next i
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -