www.pudn.com > DSPtoPC(VB).zip > Form3.frm


VERSION 5.00 
Begin VB.Form Form3  
   BorderStyle     =   1  'Fixed Single 
   Caption         =   "读卡" 
   ClientHeight    =   2310 
   ClientLeft      =   45 
   ClientTop       =   330 
   ClientWidth     =   3630 
   Icon            =   "FORM3.frx":0000 
   LinkTopic       =   "Form3" 
   MaxButton       =   0   'False 
   MinButton       =   0   'False 
   ScaleHeight     =   2310 
   ScaleWidth      =   3630 
   StartUpPosition =   2  '屏幕中心 
   Begin VB.CommandButton Command2  
      Caption         =   "取消(&Q)" 
      Height          =   375 
      Left            =   2040 
      TabIndex        =   1 
      Top             =   720 
      Width           =   855 
   End 
   Begin VB.CommandButton Command1  
      Caption         =   "读卡(&R)" 
      Height          =   375 
      Left            =   480 
      TabIndex        =   0 
      Top             =   720 
      Width           =   855 
   End 
End 
Attribute VB_Name = "Form3" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Private Declare Function OmrS Lib "omrclien.dll" (ByVal buffer As String) As String 
Private Declare Function OmrG Lib "omrclien.dll" (ByVal buffer As String) As String 
 
Private Sub Command1_Click() 
Dim buffer As String 
Dim v As String 
Dim C As Boolean 
C = True 
buffer = "S " & App.Path & "\105.txt/" 
OmrS (buffer) 
OmrG (buffer) 
While C = True 
buffer = "/ " 
v = OmrS(buffer) 
v = OmrG(buffer) 
'MsgBox buffer 
If Left(Trim(buffer), 2) = "OK" Then 
       buffer = "001" + Space(250) + "/" 
       OmrS (buffer) 
       OmrG (buffer) 
       MsgBox buffer 
          '//// 
         
        '///// 
           'TmOmrGetStatu (cmd) 
     'If Left(Trim(cmd), 2) = "OK" Then 
       ' TmOmrGetValue (cmd) 
   ' End If 
Else 
Exit Sub 
cmd = "-/" 
v = OmrS(cmd) 
v = OmrG(cmd) 
Select Case v 
      Case "01" 
        MsgBox "无格式命令错" 
        C = False 
      Case "02" 
        MsgBox "内存溢出" 
        C = False 
      Case "03" 
        MsgBox "双张错" 
        C = False 
      Case "04" 
        MsgBox "类型标志错" 
        C = False 
     Case "05" 
        MsgBox "检测点线错" 
        C = False 
     Case "06" 
        MsgBox "命令或命令参数错" 
        C = False 
     Case "07" 
        MsgBox "卡纸或同步信号错" 
        C = False 
     Case "16" 
        n = MsgBox("是否继续读卡?", 32 + 4) 
        If n = 6 Then 
            C = True 
        Else 
            C = False 
        End If 
   End Select 
End If 
Wend 
 
  
  
End Sub 
 
Private Sub Command2_Click() 
Unload Me 
End Sub