i'm Developing a POS systems in C#, and I have a Display Poll (serial port by USB), and i'm facing an issue when i send something to be displayed on the device.
i have the following code:
private void button3_Click(object sender, EventArgs e)
SerialPort sport = new SerialPort("COM3", 9600, Parity.None, 8, StopBits.One);
sport.Open();
sport.Write(new byte[] {0x0C}, 0,1);
sport.Write("My System");
sport.Write(new byte[] { 0x0A, 0x0D }, 0, 2);
sport.Write(textBox2.Text);
sport.Close();
}
if i use the above code the display will be like the following (not constant)
my my s my sy
every time something missing.
but if i uncommet the messagebox command every thing works fine.
i don't need the messagebox or any other command, What it wrong and what should i do?
Please Help