receiving data from serialport stops when main form is minimized or moved
Posted
by
Rahul
on Stack Overflow
See other posts from Stack Overflow
or by Rahul
Published on 2011-01-12T09:46:19Z
Indexed on
2011/01/12
9:54 UTC
Read the original article
Hit count: 263
c#
Sir,
I apologize if this is already covered somewhere. I did a search and find something which I have already implemented.
I am developing an application which receives data from a device connected via serialport. I am using SerialPort datareceived event to capture data. I am to display data in text boxes of the main form. Data is received frequently. I used Timer to send command to the device, in response device send some data. Timer interval is 100 ms. In every 100 ms interval some command is sent and correspondingly data is received. I used Invoke function to update the GUI elements like TExtbox, labels etc. Everything is fine. All the elements are updating beautifully. But during receiving data if I make any change in main form like moving form, minimizing, maximizing, or clicking somewhere in the form, then data receiving stops. I couldnot find the reason why its happening ? I also changed the timer interval to 200,300,400,500 but same problem is there.
Please tell me why its happening? And possible solution...
Thanks In advance.... :)
© Stack Overflow or respective owner