0

我是一个基本的指纹程序员,我真的不知道如何在 VB 6 上使用组件 CZKEM 获取数据。

这是我的代码,我使用它时出错。

Dim dwEnrollNumber As Long
Dim dwVerifyMode As Long
Dim dwInOutMode As Long
Dim timeStr As String
Dim i As Long
Dim lAddNew As Boolean

If CZKEM1.ReadGeneralLogData(vMachinenumber) Then
    i = 1
    CZKEM1.ReadAllUserID (vMachinenumber)

    While CZKEM1.GetGeneralLogDataStr(vMachinenumber, dwEnrollNumber, dwVerifyMode, dwInOutMode, timeStr)

        ListView1.ListItems.Add i, , dwEnrollNumber
        With ListView1.ListItems(i)
            .SubItems(1) = IIf(IsNull(timeStr), “”, timeStr)
            .SubItems(2) = IIf(IsNull(vMachinenumber), “”, vMachinenumber)
            .SubItems(3) = IIf(IsNull(dwVerifyMode), “”, IIf(dwVerifyMode = 1, “Fingerprint”, “Password”))
            DoEvents
        End With

        Dim d_TimeStr As Date
        d_TimeStr = CDate(Left(Right(Left(timeStr, 10), 2) & “ - ” & Mid(Left(timeStr, 10), 6, 2) & “ - ” & Left(Left(timeStr, 10), 4) & ” & ” & Right(Trim(timeStr), 8), Len(Right(Left(timeStr, 10), 2) & “ - ” & Mid(Left(timeStr, 10), 6, 2) & “ - ” & Left(Left(timeStr, 10), 4) & ” & ” & Right(Trim(timeStr), 8))))

        ListView1.ListItems.Add i, , dwEnrollNumber
        With ListView1.ListItems(i)
            .SubItems(1) = IIf(IsNull(timeStr), “”, timeStr)
            .SubItems(2) = IIf(IsNull(vMachinenumber), “”, vMachinenumber)
            .SubItems(3) = IIf(IsNull(dwVerifyMode), “”, IIf(dwVerifyMode = 1, “Fingerprint”, “Password”))
            DoEvents
        End With

        ListView1.Refresh
    Wend
End If

错误说:“无效的属性值”任何人请帮我解决这个问题...... :(

4

1 回答 1

0

这个答案可以作为替代方案:

  1. 检查您的指纹机:是否为 TFT(带彩色液晶屏)> 对于 TFT 机器(您可以使用:IsTFTMachine (dwMachineNumber)语法检查),您必须使用CZKEM1.SSR_GetGeneralLogDataStr(vMachinenumber, dwEnro......

  2. 请务必检查每个给定的参数,因为dwEnrollNumber. 具体来说,在 TFT 机器上是 a string,在非 TFT 机器上是 a long。这可能是您的代码给出错误消息的原因。

于 2015-02-17T19:40:16.020 回答