I am listening the port and Once I receive the message doing some of processing than inserting into the database. All good so far.
The issue is that into the method of port_received I'd like to popup the form of showing that the device received message and depends user click the OK and seeing the message. And at the background of the popup form there is a timer and closing the form in 2 sec unless user doesnt click the button of see the message.
I am calling the form than .ShowDialog()
after that I am loosing my serial port communication.
If I use .Show()
I cannot see the properly
some of code:
private void port_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
data = comport.ReadLine();
ReceiveMessagePopup popUp = new ReceiveMessagePopup(data);
popUp.Location = new Point(150, 150);
popUp.ShowDialog();
/// after that code I cannot do anything even cannot show any MessageBox.
}