I am working on write a program that reads and writes from the barcode my problem when writing (send command to barcode)
I read in pdf manufacturer barcode that the command of capturing the image is IMGSNP so i pass it to write function as follows serialPortObj.write ("IMGSNP")
But Why does not have a barcode to respond to the command ? and did not capture the image :( Is this wrong way (I have in some cases may need to take image Not for barcode it self but image for passport or product etc.. Which doesn't contains a barcode ) Barcode manufacturer is HandHeld (4800p) Thanks for any help
here is my code
private SerialPort Com ;
private delegate void DataReadDel(string Text);
private void Form1_Load(object sender, EventArgs e)
{
Com = new SerialPort("COM4");
Com.Open();
Com.DataReceived += new SerialDataReceivedEventHandler(port_DataReceived);
}
private void port_DataReceived(object sender,SerialDataReceivedEventArgs e)
{
Com.Encoding = Encoding.Default;
this.BeginInvoke(new DataReadDel(DataReceived), new object[] {Com.ReadExisting() });
}
private void DataReceived(string dR)
{
textBox1.Text = dR;
}
private void button1_Click(object sender, EventArgs e)
{
if (! Com.IsOpen )
{
Com.Open();
}
Com.Write("IMGSNP1B1L");
Com.Write("IMGSHP");
string imgbytes = Com.ReadExisting();// return ""
}