📄 receiveb.frm
字号:
VERSION 5.00
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin MSCommLib.MSComm MSComm1
Left = 3360
Top = 1200
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
DTREnable = -1 'True
End
Begin VB.TextBox Text1
Height = 495
Left = 960
Locked = -1 'True
TabIndex = 0
Top = 1200
Width = 1695
End
Begin VB.Label Label1
Caption = "接收数据:"
Height = 255
Left = 960
TabIndex = 1
Top = 600
Width = 1215
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
MSComm1.CommPort = 1
MSComm1.PortOpen = True
MSComm1.RThreshold = 1
MSComm1.InputMode = comInputModeText
MSComm1.Settings = "9600,o,8,1"
End Sub
Private Sub MSComm1_OnComm()
If MSComm1.CommEvent = comEvReceive Then
Dim i As Integer, buff As String
buff = MSComm1.Input
Text1.BackColor = RGB(255, 0, 0)
Text1.Text = Hex$(AscB(buff))
End If
End Sub
'mmmnnnnThenhhh
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -