📄 irda.frm
字号:
VERSION 5.00
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Begin VB.Form Form1
Caption = "IrDA无线传送和接收测试程序"
ClientHeight = 5475
ClientLeft = 60
ClientTop = 345
ClientWidth = 6525
LinkTopic = "Form1"
ScaleHeight = 5475
ScaleWidth = 6525
StartUpPosition = 3 '窗口缺省
Begin MSCommLib.MSComm MSComm2
Left = 6000
Top = 4560
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
CommPort = 2
DTREnable = 0 'False
ParityReplace = 48
RThreshold = 1
BaudRate = 1200
End
Begin MSCommLib.MSComm MSComm1
Left = 2880
Top = 4560
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
DTREnable = 0 'False
ParityReplace = 48
RThreshold = 1
BaudRate = 1200
End
Begin VB.CommandButton Command2
Caption = "清除"
Height = 495
Left = 3600
TabIndex = 3
Top = 4560
Width = 2295
End
Begin VB.CommandButton Command1
Caption = "传送"
Height = 495
Left = 480
TabIndex = 2
Top = 4560
Width = 2295
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "MS Sans Serif"
Size = 18
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 4035
Left = 3360
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 1
Top = 480
Width = 2895
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "MS Sans Serif"
Size = 18
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 4035
Left = 240
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 0
Top = 480
Width = 2895
End
Begin VB.Label Label1
Caption = "IrDA钡Μ(COM 2)"
BeginProperty Font
Name = "Tahoma"
Size = 11.25
Charset = 136
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 3480
TabIndex = 5
Top = 120
Width = 2295
End
Begin VB.Label Label2
Caption = "IrDA发射(COM 1)"
BeginProperty Font
Name = "Tahoma"
Size = 11.25
Charset = 136
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 720
TabIndex = 4
Top = 120
Width = 2055
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
MSComm1.Output = Text1.Text '
End Sub
Private Sub Command2_Click() '
Text2.Text = ""
End Sub
Private Sub Form_Load()
If MSComm1.PortOpen = False Then
MSComm1.PortOpen = True '
End If
If MSComm2.PortOpen = False Then
MSComm2.PortOpen = True '
End If
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If MSComm1.PortOpen = True Then MSComm1.PortOpen = False
If MSComm2.PortOpen = True Then MSComm2.PortOpen = False
End
End Sub
Private Sub MSComm2_OnComm()
Select Case MSComm2.CommEvent '
Case comEvReceive '
Text2.Text = Text2.Text & CStr(MSComm2.Input)
End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -