📄 form1.frm
字号:
VERSION 5.00
Object = "{9C325911-BF0F-11D1-81F0-7260BC000000}#1.0#0"; "Anir.ocx"
Begin VB.Form Form1
Caption = "Test Program for Anir OCX"
ClientHeight = 3030
ClientLeft = 1485
ClientTop = 1305
ClientWidth = 4515
Icon = "Form1.frx":0000
LinkTopic = "Form1"
ScaleHeight = 3030
ScaleWidth = 4515
Begin VB.CommandButton Command1
Caption = "OK"
Default = -1 'True
Height = 375
Left = 3120
TabIndex = 1
Top = 2520
Width = 1215
End
Begin VB.ListBox List1
Height = 1815
Left = 240
TabIndex = 0
Top = 480
Width = 4095
End
Begin ANIRREMOTELib.AnirRemote AnirRemote1
Left = 240
Top = 2520
_Version = 65536
_ExtentX = 847
_ExtentY = 847
_StockProps = 0
End
Begin VB.Label Label2
Caption = "Data Received:: Key Code followed by bRepeat"
Height = 255
Left = 240
TabIndex = 2
Top = 120
Width = 4095
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub AnirRemote1_ProcessReceivedData(ByVal nData As Integer, ByVal bRepeat As Boolean)
Dim s As String
s = Str(nData) + " " + Str(bRepeat)
Rem empty out the listbox if there is more than 100 items in it
If List1.ListCount > 100 Then
List1.Clear
End If
List1.AddItem (s)
List1.Selected(List1.ListCount - 1) = True
End Sub
Private Sub Command1_Click()
Unload Form1
End Sub
Private Sub Form_Load()
If AnirRemote1.Start(1) = False Then
MsgBox ("Failed to open the remote control, please ensure other programs do no have the comms port open")
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
AnirRemote1.Stop
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -