📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 4830
ClientLeft = 60
ClientTop = 450
ClientWidth = 7290
LinkTopic = "Form1"
ScaleHeight = 4830
ScaleWidth = 7290
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton driver
Caption = "灯控"
Height = 495
Left = 3720
TabIndex = 8
Top = 4080
Width = 1575
End
Begin VB.CommandButton readver
Caption = "读版本号"
Height = 495
Left = 2160
TabIndex = 7
Top = 4080
Width = 1575
End
Begin VB.CommandButton wizap
Caption = "断开连接"
Height = 495
Left = 600
TabIndex = 6
Top = 4080
Width = 1575
End
Begin VB.CommandButton EXITT
Caption = "退出"
Height = 495
Left = 3720
TabIndex = 5
Top = 3600
Width = 1575
End
Begin VB.CommandButton lianjie
Caption = "连接"
Height = 495
Left = 2160
TabIndex = 4
Top = 3600
Width = 1575
End
Begin VB.CommandButton clear
Caption = "清屏"
Height = 495
Left = 600
TabIndex = 3
Top = 3600
Width = 1575
End
Begin VB.ListBox List1
Height = 1860
ItemData = "Form1.frx":0000
Left = 600
List = "Form1.frx":0002
TabIndex = 2
Top = 1440
Width = 4695
End
Begin VB.TextBox Text1
Height = 735
Left = 2880
TabIndex = 1
Top = 480
Width = 2415
End
Begin VB.Frame Frame1
Caption = "卡片序列号"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 600
TabIndex = 0
Top = 480
Width = 1815
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim flag As Integer
Dim status As Long
Dim i As Long
Dim ReadBuff(16) As Byte
Dim wtdata As String * 32
Private Sub Label1_Click()
End Sub
Private Sub Command1_Click()
End Sub
Private Sub clear_Click()
MousePointer = 99
List1.clear
MousePointer = 0
End Sub
Private Sub Command2_Click()
End Sub
Private Sub driver_Click()
Dim mode As Long
Dim actiontime As Long
Dim intervaltime As Long
Dim count As Long
MousePointer = 99
mode = 7
actiontime = 30
intervaltime = 30
count = 3
status = ALARM(mode, actiontime, intervaltime, count)
If status = 0 Then
List1.clear
List1.AddItem " "
List1.AddItem "读控制软件版本号成功!"
Else
List1.AddItem ""
List1.AddItem "读控制软件版本号失败!"
End If
MousePointer = 0
End Sub
Private Sub EXITT_Click()
On Error Resume Next
End
End Sub
Private Sub lianjie_Click()
Dim Port As Long
Dim mcmno As Long
status = AutoLinkCom(Port)
List1.AddItem " "
If status = 0 Then
status = RFMifare_Mcmno(mcmno)
If mcmno = 17 Then
List1.AddItem "系统与CE06 MIFARE读写器连接成功!"
driver.Enabled = True
Else
List1.AddItem "通信口连接失败!请检查MF读写器连接是否正常!"
End If
End Sub
Private Sub readver_Click()
Dim mcmver(20) As Byte
Dim temp As String
Dim i As Byte
MousePointer = 99
status = DEVVER(memver(0))
If status = 0 Then
List1.clear
List1.AddItem " "
List1.AddItem "读控制软件版本号成功!"
temp = " "
For i = 0 To 7
temp = temp + Hex(mcmver(i))
Next
List1.AddItem temp
Else
List1.AddItem ""
List1.AddItem "读控制软件版本号失败!"
End If
MousePointer = 0
End Sub
Private Sub wizap_Click()
MousePointer = 99
status = UnLinkCom()
If status = 0 Then
List1.clear
List1.AddItem " "
List1.AddItem "断开连接成功!"
Else
List1.clear
List1.AddItem " "
List1.AddItem "断开连接失败!"
End If
MousePointer = 0
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -