# Mobile Continuous Data Display Problem

  • Thread starter Thread starter tim cummings via .NET 247
  • Start date Start date
T

tim cummings via .NET 247

I am writing a program that interfaces with a cars pcm via theserial port and recieves data (such as rpm) at an interval, oflets say 1 second, and then formats it. The problem is, I wouldlike to display the data that is coming in over the port andhave it continously displayed until the user decides they wantthe data to stop.

Currently the only way I have found to show the data in a"streaming" fashion is to loop the request, but once I do that Icannot break out of the loop (PDA wont let me click on any otheritem on form while loop running).

Any suggestions, or other Ideas on how to start and stop the dataupon user request

thanks,
tim
 
tim cummings via .NET 247 said:
I am writing a program that interfaces with a cars pcm via the serial
port and recieves data (such as rpm) at an interval, of lets say 1
second, and then formats it. The problem is, I would like to display
the data that is coming in over the port and have it continously
displayed until the user decides they want the data to stop.

Currently the only way I have found to show the data in a "streaming"
fashion is to loop the request, but once I do that I cannot break out
of the loop (PDA wont let me click on any other item on form while
loop running).

Any suggestions, or other Ideas on how to start and stop the data
upon user request

Do the work in a different thread, and use Control.Invoke to update the
UI on the UI thread.

See
http://www.pobox.com/~skeet/csharp/multithreading.html#windows.forms
for more details. Note that on the Compact Framework, there are
limitations about which delegates you can call Control.Invoke with - I
believe you can only use EventHandler delegates, basically.
 
Back
Top