SerialPort serial = new SerialPort("COM4", 9600); Timer timer = new Timer(); public Form1() { InitializeComponent(); timer.Interval=5; timer.Tick += new EventHandler(aktivuj); } public void aktivuj(object sender,EventArgs e) { string s; Invalidate(); serial.Open(); serial.Write(textBox1.Text.ToString()); s = serial.ReadLine(); serial.Close(); label1.Text = s; }
UnauthorizedAccessException
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)