Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Serialport
Message
From
30/06/2006 12:38:23
 
 
To
30/06/2006 02:28:20
General information
Forum:
ASP.NET
Category:
Other
Title:
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01129986
Message ID:
01133115
Views:
18
Stuart,

Are you getting a threading exception thrown? If so, see this for the reason, and this for a solution.

>the code below (I have stripped out some lines )shows what I am trying to do. It crashes with any code in OnSerialDataReceived even if its just updating a text box. I can see the data if i step through the code in OnSerialDataReceived so that part works.
>
>sorry for the long delay I have had one of those weeks :)
>any help gratefully received
>thanks
>Stuart
>
>
>      public SerialPort ComPort;
>       public scan1 oScan;
>
>             oScan = new scan1();
>
>              ComPort = new SerialPort(port, baud);
>
>                ComPort.Parity = Parity.None;
>                ComPort.StopBits = StopBits.One;
>                ComPort.DataBits = 8;
>                ComPort.Handshake = Handshake.None;
>                ComPort.DataReceived += OnSerialDataReceived;
>
>        public void OnSerialDataReceived(object sender, SerialDataReceivedEventArgs args)
>        {
>
>            string data = this.ComPort.ReadExisting();
>
>            oScan.updateScan(data);
>
>        }
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform