-
April 24th, 2016, 07:11 AM
#1
Error: operator '=' is not defined for types system windows forms checkbox
Received the following error:
operator '=' is not defined for types system windows forms checkbox
Code:
ckb.Checked = True
If ckb = checkBox1 Then
refsize1 = ffe.refsize
ffe.refbuf.CopyTo(refbuf1, 0)
ElseIf ckb = checkBox2 Then
refsize2 = ffe.refsize
ffe.refbuf.CopyTo(refbuf2, 0)
End if
Please help
-
April 24th, 2016, 07:59 AM
#2
Re: Error: operator '=' is not defined for types system windows forms checkbox
Victor Nijegorodov
-
April 24th, 2016, 09:30 AM
#3
Re: Error: operator '=' is not defined for types system windows forms checkbox
About error Operator '<>' in not defined for type 'object' and system.DBNull code bellow
Private Sub buttonIdentifyn_Click(sender As System.Object, e As System.EventArgs) Handles buttonIdentifyn.Click
If dataGridView1.CurrentCell.RowIndex >= FpdbDataSet.fplist.Rows.Count Then
Return
End If
Dim ffi As New FormFingerIdentify()
If ffi.ShowDialog() = DialogResult.OK Then
Dim row As Integer = 0
While row < FpdbDataSet.fplist.Rows.Count
Dim cr As DataRow = Me.FpdbDataSet.fplist.Rows(row)
Dim i As Int32 = 12
While i < 22
If cr(i) <> DBNull.Value Then
Dim refbuf As Byte() = CType(cr(i), Byte())
Dim refsize As Integer = refbuf.GetLength(0)
If fpengine.MatchTemplateOne(ffi.matbuf, refbuf, refsize) > 100 Then
Dim txt As [String]
txt = "Succeed>>ID:" + cr.ItemArray.GetValue(0).ToString() + " Name:" + cr.ItemArray.GetValue(1).ToString() + " Finger Number:" + (i - 11).ToString()
MessageBox.Show(txt, "Search Users")
Return
End If
End If
i += 1
End While
row += 1
End While
MessageBox.Show("Fail", "Search Users")
Return
End If
End Sub
And error operator '=' is not defined for types system windows forms checkbox code bellow
Public Sub FormUserEnrol_CheckClick(sender As Object, e As EventArgs)
Dim ckb As CheckBox
ckb = TryCast(sender, CheckBox)
Dim ffe As New FormEnrol()
If ffe.ShowDialog() = DialogResult.OK Then
ckb.Checked = True
If ckb = checkBox1 Then
refsize1 = ffe.refsize
ffe.refbuf.CopyTo(refbuf1, 0)
ElseIf ckb = checkBox2 Then
refsize2 = ffe.refsize
ffe.refbuf.CopyTo(refbuf2, 0)
Else
ckb.Checked = False
If ckb = checkBox1 Then
refsize1 = 0
ElseIf ckb = checkBox2 Then
refsize2 = 0
End If
End Sub
-
April 24th, 2016, 10:54 AM
#4
Re: Error: operator '=' is not defined for types system windows forms checkbox
1. Please, use CODE tags while posting code snippets!
2.
About error Operator '<>' in not defined for type 'object' and system.DBNull code bellow
Code:
...
Dim ffi As New FormFingerIdentify()
If ffi.ShowDialog() = DialogResult.OK Then
Dim row As Integer = 0
While row < FpdbDataSet.fplist.Rows.Count
Dim cr As DataRow = Me.FpdbDataSet.fplist.Rows(row)
Dim i As Int32 = 12
While i < 22
If cr(i) <> DBNull.Value Then
Perhaps, you should have better explained what you were trying to compare and with which value?
Victor Nijegorodov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|