private void button1_Click(object sender, EventArgs e) { SerialPort sp = new SerialPort(); sp.PortName = "COM1"; sp.BaudRate = 9600; sp.Parity = Parity.None; sp.DataBits = 8; sp.StopBits = StopBits.One; sp.Open(); sp.WriteLine (" "); sp.WriteLine("Hi welocme here"); sp.Close(); sp.Dispose(); sp = null; }
sp.WriteLine (" "); sp.WriteLine("Hi welocme here");
sp.WriteLine("1st line"); sp.WriteLine((char)13 + "2nd line");
sp.Write(Convert.ToString((char)12));
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)