📄 frmduka.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin MSComCtl2.DTPicker DTPicker2
Height = 495
Left = 6720
TabIndex = 12
Top = 6120
Width = 855
_ExtentX = 1508
_ExtentY = 873
_Version = 393216
Format = 24576001
CurrentDate = 37332
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 615
Left = 6600
TabIndex = 11
Top = 5040
Width = 855
_ExtentX = 1508
_ExtentY = 1085
_Version = 393216
Format = 24576001
CurrentDate = 37332
End
Begin VB.CommandButton Command3
Caption = "Command3"
Height = 735
Left = 6240
TabIndex = 10
Top = 7320
Width = 1695
End
Begin VB.Frame Frame2
Height = 6015
Left = 240
TabIndex = 8
Top = 1920
Width = 4095
Begin VB.ListBox List1
Height = 5460
Left = 240
TabIndex = 9
Top = 360
Width = 3495
End
End
Begin VB.Frame Frame1
Caption = "读卡资料"
ForeColor = &H00FF0000&
Height = 2295
Left = 4440
TabIndex = 3
Top = 1920
Width = 4215
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 1920
TabIndex = 5
Top = 1440
Width = 1575
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1920
TabIndex = 4
Top = 480
Width = 1575
End
Begin VB.Label Label3
Caption = "卡身号:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 600
TabIndex = 7
Top = 1440
Width = 855
End
Begin VB.Label Label2
Caption = "卡号:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 720
TabIndex = 6
Top = 600
Width = 855
End
End
Begin VB.CommandButton Command2
Caption = "结束"
Height = 735
Left = 10080
TabIndex = 2
Top = 7320
Width = 855
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 735
Left = 8400
TabIndex = 1
Top = 7320
Width = 855
End
Begin VB.Label Label1
Caption = " 读 卡 系 统"
BeginProperty Font
Name = "宋体"
Size = 42
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 975
Left = 2400
TabIndex = 0
Top = 240
Width = 6855
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command3_Click()
status = OpenComm(com)
If status < 0 Then
MsgBox "打开串口失败!", vbOKOnly, "提醒!!"
CloseComm (status)
Else
node_address = "0"
password = "0"
record_data = 1.11111111111111E+29
'record_data_Next = 1.11111111111111E+29
Wo = Hand_Shake(status, node_addr, password) '握手
If Wo = 0 Then
ST = Get_Curr_Record(status, node_addr, record_data)
If ST = -9 Then
If status > 0 Then
CloseComm (status)
Else
MsgBox "关闭串口失败!", vbOKOnly, "提醒!"
End If
MsgBox "没有可读数据!!", vbOKOnly, "提醒!!"
Exit Sub
End If
If ST = 0 Then
Curr = record_data
NO = Left(Right(record_data, 8), 6)
List1.AddItem = NO
End If
If ST = 0 Then
Do While ST = 0
ST = Get_Next_Record(status, node_addr, record_data)
If ST = 0 Then
NO = Left(Right(record_data, 8), 6)
List1.AddItem NO
i = i + 1
End If
Loop
End If
If status > 0 Then
CloseComm (status)
Else
MsgBox "关闭串口失败!", vbOKOnly, "提醒!"
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -