?? 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
'*****************************
'定義指令集和云臺狀態(tài)集
'*****************************
Private ByteCodeChoose(32) As Byte '云臺選擇指令集
Private ByteCodeAct(5) As Byte '狀態(tài)控制指令集
Private ByteCodeMir(6) As Byte '鏡頭控制指令集
Private ByteCodeStatus(3) As Byte '狀態(tài)控制指令集
Private ByteStatus(32, 2) As Byte '所有云臺的狀態(tài)集合
'******************************
'其它
'******************************
Public UserResult As VbMsgBoxResult '用戶選擇
Private beInitialized As Boolean '是否被始化
'******************************
'聲明結(jié)束
'******************************
'*************************************
'功能:獲取本模塊內(nèi)的指令集數(shù)據(jù)
'*************************************
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
'***************************************
'功能:設(shè)置本模塊內(nèi)的指令集數(shù)據(jù)
'***************************************
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
'********************************************
'功能:應(yīng)用本模塊中當(dāng)前的指令集來顯示到窗體的各控件中
'********************************************
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
'***********************************************
'從窗體的各控件中讀取數(shù)據(jù)存放到本模塊的指令集中
'************************************************
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()
'設(shè)置云臺控制代碼標(biāo)簽值
beInitialized = False
'設(shè)置靜態(tài)文本框文本
SetlabIndex
'顯示當(dāng)前指令設(shè)置
UseInitData
End Sub
'***************************************
'設(shè)置靜態(tài)文本框文本
'****************************************
Private Sub SetlabIndex()
Dim i As Integer
For i = 0 To 31
labCodeYuntai(i).Caption = i + 1
Next i
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -