📄 form1.frm
字号:
VERSION 5.00
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Begin VB.Form Form1
Caption = "nRF9E5 Hopping Demo"
ClientHeight = 1170
ClientLeft = 60
ClientTop = 345
ClientWidth = 2835
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1170
ScaleWidth = 2835
StartUpPosition = 3 'Windows Default
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 500
Left = 960
Top = 120
End
Begin MSCommLib.MSComm MSComm1
Left = 120
Top = 120
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
DTREnable = 0 'False
BaudRate = 19200
End
Begin VB.TextBox ctlTempR
Height = 285
Left = 1920
TabIndex = 3
Top = 720
Width = 735
End
Begin VB.TextBox ctlTempL
Height = 285
Left = 1920
TabIndex = 2
Top = 240
Width = 735
End
Begin VB.Label Label2
Alignment = 1 'Right Justify
Caption = "Remote temperature:"
Height = 255
Left = 120
TabIndex = 1
Top = 720
Width = 1550
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
Caption = "Local temperature:"
Height = 255
Left = 120
TabIndex = 0
Top = 240
Width = 1550
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.PortOpen = True
Timer1.Enabled = True
End Sub
Private Sub UpdateTemperature(s As String, Ctrl As TextBox)
MSComm1.Output = s
While MSComm1.InBufferCount < 4
Wend
s = MSComm1.Input
If s = "FFFF" Then
Ctrl.Text = "NA" ' Not Available
Else
Ctrl.Text = Format(122 * CDbl("&H" & s) / 4096#, "00.00")
End If
End Sub
Private Sub Timer1_Timer()
UpdateTemperature "L", ctlTempL
UpdateTemperature "R", ctlTempR
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -