I am working a window application to display data continuously from serial port on a textbox. the following is my code. I get this error when i run the program:
"The I/O operation has been aborted because of either a thread exit or an application request."
How can I solve this issue?
private void mainform_Load(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Maximized;
getWGT();
}
SerialPort port = new SerialPort();
public void getWGT()
{
try
{
port.PortName = "COM1";
port.BaudRate = 9600;
port.StopBits = System.IO.Ports.StopBits.One;
port.DataBits = 8;
port.Parity = System.IO.Ports.Parity.None;
port.Open();
port.DataReceived += new SerialDataReceivedEventHandler(DataReceivedH ...
Go to the complete details ...