so. i downloaded a dll of the net and im trying parse data through it.
this bit of code i pretty much ported from VB so i expect a reason its not working for me is the syntax is incorrect. iv tried to make it as c# as i know how. but no joy. i get 'canot convert image to bitmap' on line 2, error on line 3, and empty statement error on 'if (barcodes.Count > 0);' and bC not defined i think.
help please:)
ArrayList barcodes = new ArrayList();
BarcodeImaging.FullScanPageCode39(ref barcodes, pictureBox1.Image, 10);
bC as object;
//check data is in array, show msgbox and put result in lblResult else show msgbox (no code found)
if (barcodes.Count > 0);
{
MessageBox.Show("barcode found :)");
lblResult.Text = bC;
}
MessageBox.Show("No Barcode Found :(");
the VB code i took it from:
Private Sub MenuItem6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem6.Click
If Not Me.PictureBox1.Image Is Nothing Then
Dim barcodes As New System.Collections.ArrayList
BarcodeImaging.FullScanPageCode39(barcodes, Me.PictureBox1.Image, 10)
If barcodes.Count > 0 Then
Dim Message As String = "Found barcodes:" & vbNewLine
Dim bc As Object
For Each bc In barcodes
Message = Message & bc & vbNewLine
Next
MsgBox(Message, MsgBoxStyle.OKOnly)
Else
MsgBox("Failed to find a barcode")
End If
Me.Refresh()
End If
End Sub