📄 串口1.frm
字号:
VERSION 5.00
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Begin VB.Form Form1
AutoRedraw = -1 'True
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Caption = "XX星载系统TDICCD配置软件"
ClientHeight = 7980
ClientLeft = 1620
ClientTop = 1920
ClientWidth = 10755
FillColor = &H00C0C0C0&
ForeColor = &H00E0E0E0&
Icon = "串口1.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 7980
ScaleWidth = 10755
Begin VB.TextBox Text14
Height = 375
Left = 6000
TabIndex = 13
Top = 3960
Width = 1695
End
Begin VB.TextBox Text13
Height = 375
Left = 1200
TabIndex = 12
Top = 7440
Width = 2175
End
Begin VB.TextBox Text12
Height = 375
Left = 1200
TabIndex = 11
Top = 6880
Width = 2175
End
Begin VB.TextBox Text11
Height = 375
Left = 1200
TabIndex = 10
Top = 6320
Width = 2175
End
Begin VB.TextBox Text10
Height = 375
Left = 1200
TabIndex = 9
Top = 5760
Width = 2175
End
Begin VB.TextBox Text9
Height = 375
Left = 1200
TabIndex = 8
Top = 5200
Width = 2175
End
Begin VB.TextBox Text8
Height = 375
Left = 1200
TabIndex = 7
Top = 4640
Width = 2175
End
Begin VB.TextBox Text7
Height = 375
Left = 1200
TabIndex = 6
Top = 4080
Width = 2175
End
Begin VB.TextBox Text6
Height = 375
Left = 1200
TabIndex = 5
Top = 3520
Width = 2175
End
Begin VB.TextBox Text5
Height = 375
Left = 1200
TabIndex = 4
Top = 2960
Width = 2175
End
Begin VB.TextBox Text4
Height = 375
Left = 1200
TabIndex = 3
Top = 2400
Width = 2175
End
Begin VB.TextBox Text3
Height = 375
Left = 1200
TabIndex = 2
Top = 1840
Width = 2175
End
Begin VB.TextBox Text2
Height = 375
Left = 1200
TabIndex = 1
Top = 1280
Width = 2175
End
Begin VB.TextBox Text1
Height = 375
Left = 1200
TabIndex = 0
Top = 720
Width = 2175
End
Begin MSCommLib.MSComm com1
Left = 4920
Top = 2640
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
DTREnable = -1 'True
InputLen = 1
RThreshold = 1
BaudRate = 1200
SThreshold = 1
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim receive(256) As Integer
Dim i As Integer
Dim changedata
Private Sub com1_OnComm()
Select Case com1.CommEvent
Case comEvReceive
receive(i) = Asc(com1.Input)
i = i + 1
If com1.OutBufferCount <= 12 Then
Text1.Text = receive(0)
Text2.Text = receive(1)
Text3.Text = receive(2)
Text4.Text = receive(3) - 48
Text5.Text = receive(4) - 48
Text6.Text = receive(5) - 48
Text7.Text = receive(6) - 48
Text8.Text = receive(7) - 48
Text9.Text = receive(8) - 48
Text10.Text = receive(9) - 48
Text11.Text = receive(10) - 48
Text12.Text = receive(11)
Text13.Text = receive(12)
Text14.Text = Text4.Text & Text5.Text & Text6.Text & Text7.Text & Text8.Text & Text9.Text & Text10.Text & Text11.Text
End If
End Select
End Sub
'程序初始化
Private Sub Form_Load()
'初始化combo1
com1.CommPort = 2
com1.Settings = "57600,n,8,1"
com1.InputLen = 1
com1.InBufferSize = 256
com1.RThreshold = 1
com1.PortOpen = False
com1.OutBufferCount = 0
com1.InBufferCount = 0
com1.InBufferCount = 0
End Sub
Private Sub Frame4_DragDrop(Source As Control, X As Single, Y As Single)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -