Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try
- {
- _printPort = new SerialPort(PrinterCOMPort, 19200, Parity.None, 8, StopBits.One);
- //_printPort.PortName = "COM3";
- //_printPort.BaudRate = 9600;
- //_printPort.Parity = Parity.None;
- //_printPort.DataBits = 8;
- //_printPort.StopBits = StopBits.One;
- //_printPort.Handshake = Handshake.None;
- // Set the read/write timeouts / Buffer Size
- _printPort.ReadTimeout = 500;
- _printPort.WriteTimeout = 500;
- _printPort.WriteBufferSize = 1000000000;
- _printPort.ReadBufferSize = 1000000000;
- _printPort.Open();
- }
- catch (System.Exception excep)
- {
- MessageBox.Show("Error establishing connection with label printer:n" + excep.Message);
- }
Add Comment
Please, Sign In to add comment