Hello Friends
Im´m form Brazil and I´m developing a project usinf fingerprint sdk, I made test using api and I have success.
But I try another teste an I have problems, I´m creating on my application a dynamic form and add same components, for examplo textbox, button, etc. But when I try add GrFingerXCtrl I have a message erro below:
Unable to cast COM object of type 'GrFingerXLib.GrFingerXCtrlClass' to class type 'System.Windows.Forms.Control'. Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.
this is my code:
Public Function criaForm(ByVal nome As String) As Form
Dim f1 As New Form
Dim botao As Button = criarbotao()
Dim pic As PictureBox = criaPictureBox()
Dim griaule As GrFingerXCtrl = fingerGriaule()
f1.Text = nome.ToString
AddHandler f1.Load, AddressOf Form_Load
f1.Size = New Size(600, 600)
f1.Controls.Add(botao)
f1.Controls.Add(pic)
f1.Controls.Add(griaule) ''this line show error
Return f1
End Function
Private Function fingerGriaule() As GrFingerXCtrl
Dim griaule As New GrFingerXCtrl
Return griaule
End Function