Registrar huella con sdk zkemkeeper
Publicado por Jose pablo (1 intervención) el 23/05/2013 21:38:21
hola estoy trabajando con el sdk zkemkeeper y cuando quiero dar de alta una huella digitar quiero que me mande la imagen en un picturebox pero no me queda, este es mi codigo espero y me puedan ayudar a encontrar el error.
Private Sub BtnCapturarHuella_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnCapturarHuella.Click
Dim idusuario As Long
Dim figerindex As Long
If boconn = False Then
MsgBox("Favor de conectaarse al dispositivo")
Return
End If
If txtIDUsuario.Text.Trim = "" Or CmbFingerIndex.Text.Trim = "" Then
MsgBox("El Id de usuario o Indice de dedo no es correcto", MsgBoxStyle.Information, "Error")
Return
End If
idusuario = txtIDUsuario.Text.Trim()
figerindex = CmbFingerIndex.Text.Trim()
If zk.StartEnroll(idusuario, figerindex) = True Then
'MsgBox("si funciona")
mostrarImagen()
Else
MsgBox("no funciona")
End If
End Sub
Public Sub mostrarImagen()
Dim fullimage As Boolean = False
Dim witht, heit As Long
witht = 88
heit = 88
Dim Imagen(1024 * 8) As Byte
Dim imageFile As String = "C:\pueba\huella1.png"
If zk.CaptureImage(fullimage, witht, heit, Imagen(0), imageFile) = True Then
If fullimage = True Then
PicHuella.Image = Image.FromFile(imageFile)
End If
'PicHuella.Image=ImageFormatConverter
Else
MsgBox("imagen no capturada")
End If
' MsgBox("archivo de imagen " & imageFile)
End Sub
Private Sub BtnCapturarHuella_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnCapturarHuella.Click
Dim idusuario As Long
Dim figerindex As Long
If boconn = False Then
MsgBox("Favor de conectaarse al dispositivo")
Return
End If
If txtIDUsuario.Text.Trim = "" Or CmbFingerIndex.Text.Trim = "" Then
MsgBox("El Id de usuario o Indice de dedo no es correcto", MsgBoxStyle.Information, "Error")
Return
End If
idusuario = txtIDUsuario.Text.Trim()
figerindex = CmbFingerIndex.Text.Trim()
If zk.StartEnroll(idusuario, figerindex) = True Then
'MsgBox("si funciona")
mostrarImagen()
Else
MsgBox("no funciona")
End If
End Sub
Public Sub mostrarImagen()
Dim fullimage As Boolean = False
Dim witht, heit As Long
witht = 88
heit = 88
Dim Imagen(1024 * 8) As Byte
Dim imageFile As String = "C:\pueba\huella1.png"
If zk.CaptureImage(fullimage, witht, heit, Imagen(0), imageFile) = True Then
If fullimage = True Then
PicHuella.Image = Image.FromFile(imageFile)
End If
'PicHuella.Image=ImageFormatConverter
Else
MsgBox("imagen no capturada")
End If
' MsgBox("archivo de imagen " & imageFile)
End Sub
Valora esta pregunta


0