📄 frmmain.frm
字号:
VERSION 5.00
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Begin VB.Form frmMain
BackColor = &H80000000&
BorderStyle = 0 'None
Caption = "无线数据采集系统"
ClientHeight = 7455
ClientLeft = 2370
ClientTop = 2925
ClientWidth = 9435
FillColor = &H80000000&
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 7455
ScaleWidth = 9435
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton Command9
Caption = "发送01"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 7080
TabIndex = 15
Top = 3840
Width = 1335
End
Begin VB.CommandButton Command8
Caption = "允许发言"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 7560
TabIndex = 14
Top = 4920
Width = 1335
End
Begin VB.CommandButton Command7
Caption = "取消发言"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 7560
TabIndex = 13
Top = 6000
Width = 1335
End
Begin VB.CommandButton Command6
Caption = "取消表决"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 5160
TabIndex = 12
Top = 5880
Width = 1335
End
Begin VB.CommandButton Command5
Caption = "取消发言申请"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 3120
TabIndex = 11
Top = 6000
Width = 1335
End
Begin VB.CommandButton Command4
Caption = "取消报到"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 1200
TabIndex = 10
Top = 6000
Width = 1335
End
Begin VB.CommandButton Command3
Caption = "允许表决"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 4920
TabIndex = 9
Top = 4800
Width = 1335
End
Begin VB.CommandButton Command2
Caption = "允许发言申请"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 3000
TabIndex = 8
Top = 4800
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "允许报到"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 1200
TabIndex = 7
Top = 4800
Width = 1335
End
Begin VB.CommandButton Exit
Caption = "结束系统"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 5160
TabIndex = 6
Top = 3960
Width = 1335
End
Begin VB.CommandButton btnSend
Caption = "复位"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 3000
TabIndex = 5
Top = 3840
Width = 1335
End
Begin VB.CommandButton cmdOpen
Caption = "开启端口"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 960
TabIndex = 4
Top = 3960
Width = 1335
End
Begin VB.TextBox Text
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 1
Left = 1440
TabIndex = 3
Top = 1080
Width = 1335
End
Begin VB.TextBox Text
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 0
Left = 1440
TabIndex = 2
Top = 240
Width = 1335
End
Begin MSCommLib.MSComm MSComm1
Left = 360
Top = 3960
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
DTREnable = 0 'False
ParityReplace = 65
RThreshold = 1
InputMode = 1
End
Begin VB.Shape Shape
BackColor = &H80000000&
BorderStyle = 0 'Transparent
FillColor = &H00FF0000&
FillStyle = 0 'Solid
Height = 495
Index = 1
Left = 3480
Shape = 3 'Circle
Top = 1080
Width = 495
End
Begin VB.Shape Shape
BackColor = &H80000000&
BorderColor = &H80000005&
BorderStyle = 0 'Transparent
FillColor = &H00FF0000&
FillStyle = 0 'Solid
Height = 495
Index = 0
Left = 3480
Shape = 3 'Circle
Top = 240
Width = 495
End
Begin VB.Label Label9
Caption = "二路"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 1
Top = 1200
Width = 615
End
Begin VB.Label Label1
Caption = "一路"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 0
Left = 240
TabIndex = 0
Top = 360
Width = 615
End
Begin VB.Menu mnuPort
Caption = "&Port"
Begin VB.Menu mnuCom
Caption = "Com &1"
Checked = -1 'True
Index = 1
End
Begin VB.Menu mnuCom
Caption = "Com &2"
Index = 2
End
Begin VB.Menu mnuCom
Caption = "Com &3"
Index = 3
End
Begin VB.Menu mnuCom
Caption = "Com &4"
Index = 4
End
End
Begin VB.Menu mnuSpeed
Caption = "&Speed"
Begin VB.Menu mnuSpeedSel
Caption = "&8,000"
Checked = -1 'True
Index = 0
End
Begin VB.Menu mnuSpeedSel
Caption = "&16,000"
Index = 1
End
Begin VB.Menu mnuSpeedSel
Caption = "&32,000"
Index = 2
End
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim Data(0 To 7) As Byte
Dim aa, dd, cc As Integer
Private Sub btnSend_Click()
Dim i As Integer
Dim b As Boolean
For i = 0 To 7
'If B = True Then
' Shape(i).FillColor = &HFF&
'Else
Shape(i).FillColor = &HFF0000
Text(i).Text = ""
Next i
End Sub
Private Sub Command1_Click()
Dim BuffOut(0 To 8) As Byte
Dim BufSend As Variant
Dim i As Integer
BuffOut(0) = &HFF
BuffOut(1) = &H0
For i = 0 To 2
BuffOut(2 * i + 2) = &HFF
BuffOut(2 * i + 3) = &H1
Next i
' BuffOut(8) = BuffOut(0) + BuffOut(1) + BuffOut(2) + BuffOut(3)
BufSend = BuffOut()
End Sub
Private Sub Command2_Click()
Dim BuffOut(0 To 8) As Byte
Dim BufSend As Variant
Dim i As Integer
BuffOut(0) = &HFF
BuffOut(1) = &H0
For i = 0 To 2
BuffOut(2 * i + 2) = &HFF
BuffOut(2 * i + 3) = &H2
Next i
' BuffOut(8) = BuffOut(0) + BuffOut(1) + BuffOut(2) + BuffOut(3)
BufSend = BuffOut()
MSComm1.Output = BufSend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -