📄 mainform.frm
字号:
VERSION 5.00
Begin VB.Form MainForm
BorderStyle = 1 'Fixed Single
Caption = "Fingerprint matching demo for ActiveX control"
ClientHeight = 4725
ClientLeft = 45
ClientTop = 330
ClientWidth = 8160
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4725
ScaleWidth = 8160
StartUpPosition = 3 'Windows Default
Begin VB.TextBox matchresult
Height = 495
Left = 8280
TabIndex = 16
Top = 5520
Visible = 0 'False
Width = 2295
End
Begin VB.TextBox txtrxbio
Height = 855
Left = 720
MultiLine = -1 'True
TabIndex = 15
Top = 7560
Width = 7095
End
Begin VB.TextBox txtkeyVerify
Height = 1215
Left = 720
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 14
Top = 6120
Width = 6975
End
Begin VB.TextBox txtKey
Height = 1215
Left = 720
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 13
Top = 4680
Width = 6975
End
Begin VB.PictureBox FpLibXCapture1
BackColor = &H00FFFFFF&
Height = 2595
Index = 0
Left = 660
ScaleHeight = 2535
ScaleWidth = 1935
TabIndex = 10
Top = 1200
Width = 1995
End
Begin VB.PictureBox FpLibXCapture1
BackColor = &H00FFFFFF&
Height = 2595
Index = 1
Left = 3120
ScaleHeight = 2535
ScaleWidth = 1935
TabIndex = 11
Top = 1200
Width = 1995
End
Begin VB.PictureBox FpLibXCapture1
BackColor = &H00FFFFFF&
Height = 2595
Index = 2
Left = 5580
ScaleHeight = 2535
ScaleWidth = 1935
TabIndex = 12
Top = 1200
Width = 1995
End
Begin VB.PictureBox FPVerifyX1
Height = 480
Left = 480
ScaleHeight = 420
ScaleWidth = 1140
TabIndex = 17
Top = 120
Width = 1200
End
Begin VB.Label Label7
Height = 2715
Left = 5520
TabIndex = 8
Top = 1140
Width = 2115
End
Begin VB.Label Label5
Height = 2715
Left = 3060
TabIndex = 6
Top = 1140
Width = 2115
End
Begin VB.Label Label4
Height = 2715
Left = 600
TabIndex = 4
Top = 1140
Width = 2115
End
Begin VB.Label LabelMessage
Alignment = 2 'Center
BackColor = &H00000000&
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 178
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 315
Left = 540
TabIndex = 3
Top = 4140
Width = 7155
End
Begin VB.Label LabelTitle
Alignment = 2 'Center
BackColor = &H00800000&
BorderStyle = 1 'Fixed Single
Caption = "Matching"
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 178
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 375
Index = 2
Left = 5460
TabIndex = 2
Top = 600
Width = 2235
End
Begin VB.Label LabelTitle
Alignment = 2 'Center
BackColor = &H00800000&
BorderStyle = 1 'Fixed Single
Caption = "2nd Fingerprint"
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 178
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 375
Index = 1
Left = 3000
TabIndex = 1
Top = 600
Width = 2235
End
Begin VB.Label LabelTitle
Alignment = 2 'Center
BackColor = &H00800000&
BorderStyle = 1 'Fixed Single
Caption = "1st Fingerprint"
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 178
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 375
Index = 0
Left = 540
TabIndex = 0
Top = 600
Width = 2235
End
Begin VB.Label LabelAlarm
BackColor = &H00404040&
Height = 2835
Index = 0
Left = 540
TabIndex = 5
Top = 1080
Width = 2235
End
Begin VB.Label LabelAlarm
BackColor = &H00404040&
Height = 2835
Index = 1
Left = 3000
TabIndex = 7
Top = 1080
Width = 2235
End
Begin VB.Label LabelAlarm
BackColor = &H00404040&
Height = 2835
Index = 2
Left = 5460
TabIndex = 9
Top = 1080
Width = 2235
End
End
Attribute VB_Name = "Mainform"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim ABCD1 As String
Dim ABCD2 As String
Dim ABCD3 As String
Const ERROR_NONE = 0
Const ERROR_CREATION_FAILED = 1
Const ERROR_FUNCTION_FAILED = 2
Const ERROR_INVALID_PARAM = 3
Const ERROR_NOT_USED = 4
Const ERROR_SYSLOAD_FAILED = 51
Const ERROR_INITIALIZE_FAILED = 52
Const ERROR_LINE_DROPPED = 53
Const ERROR_TIME_OUT = 54
Const ERROR_DEVICE_NOT_FOUND = 55
Const ERROR_DLLLOAD_FAILED = 56
Const ERROR_UNLOCK_FAIL = 101
Const ERROR_DLL_LOCKED = 102
Const ERROR_REGIST_FAIL = 103
Const ERROR_VERIFY_FAIL = 104
Const ERROR_IMAGE_LOCKED = 105
Const ERROR_EXTRACT_FAIL = 106
Const ERROR_VERIFY_FAKE = 107
Const ERROR_NO_SEARCH_DATA = 108
Dim g_FirstMinData() As Byte
Dim g_SecondMinData() As Byte
Dim g_MatchingMinData() As Byte
Dim g_firstStep As Boolean
Dim g_secondStep As Boolean
Dim g_vefiryResult As Boolean
Private Sub Form_Load()
ReDim g_FirstMinData(FpLibXCapture1(0).MinutiaeSize) As Byte
ReDim g_SecondMinData(FpLibXCapture1(1).MinutiaeSize) As Byte
ReDim g_MatchingMinData(FpLibXCapture1(2).MinutiaeSize) As Byte
g_firstStep = False
g_secondStep = False
g_vefiryResult = False
End Sub
Private Sub FpLibXCapture1_Paint(Index As Integer, ByVal hwnd As stdole.OLE_HANDLE, ByVal hdc As stdole.OLE_HANDLE)
Select Case Index
Case 0
If g_firstStep = False Then
TextOut hdc, 30, 70, "Click here..", 12
End If
Case 1
If g_firstStep = True And g_secondStep = False Then
TextOut hdc, 30, 70, "Click here..", 12
End If
Case 2
If g_firstStep = True And g_secondStep = True And g_vefiryResult = False Then
TextOut hdc, 30, 70, "Click here..", 12
End If
End Select
End Sub
Public Function FpLibXCapture2_Click(Index As Integer)
Select Case (Index)
Case 0
Call FpLibXCapture1(Index).Capture
Call FpLibXCapture1(Index).GetMinutiaeData(g_FirstMinData)
Call FpLibXCapture1(Index).GetMinutiaeDataAsString(ABCD1)
Formfile1.getFinKey = ABCD1
txtKey = ABCD1
g_firstStep = True
g_secondStep = False
FpLibXCapture1(1).Clear
FpLibXCapture1(2).Clear
ColorVal = &H404040
LabelMessage.Caption = ""
LabelAlarm(0).BackColor = ColorVal
LabelAlarm(1).BackColor = ColorVal
LabelAlarm(2).BackColor = ColorVal
g_secondStep = True
Case 1
If g_secondStep = True Then
FpLibXCapture1(Index).Capture
Call FpLibXCapture1(Index).GetMinutiaeData(g_MatchingMinData)
Call FpLibXCapture1(Index).GetMinutiaeDataAsString(ABCD2)
txtrxbio = fRijndael.txtrxbiodata.Text
ABCD3 = txtrxbio
result = FPVerifyX1.Verify(ABCD3, ABCD2)
txtkeyVerify = ABCD2
If result = True Then
g_vefiryResult = True
ColorVal = &HFF00&
LabelMessage.Caption = "Identical"
matchresult = "identical"
Else
g_vefiryResult = False
If FPVerifyX1.ErrorCode = ERROR_VERIFY_FAKE Then
ColorVal = &HFFFF&
LabelMessage.Caption = "Release your finger and touch on again, please"
Else
ColorVal = &HFF&
LabelMessage.Caption = "NOT Identical"
matchresult = "notidentical"
End If
End If
LabelMessage.ForeColor = ColorVal
LabelAlarm(2).BackColor = ColorVal
End If
End Select
FpLibXCapture1(0).Refresh
FpLibXCapture1(2).Refresh
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -