المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : error on receive data from seril port



C# Programming
09-17-2013, 06:24 PM
hi
i have a problem in receive data from serial port in c# , i do`nt now why create this problem in my application .the error is :


ErrorDeviceApplication4.exeNotSupportedExceptionControl.Invoke must be used to interact with controls created on a separate thread.at Microsoft.AGL.Common.MISC.HandleAr(PAL_ERROR ar)at System.Windows.Forms.Control.get_Text()System.Wind ows.Forms.Control.set_Text(String value)at DeviceApplication4.Form1.Port_DataReceived_1(Objec t sender,SerialDataReceivedEventArgs e)at System.IO.Ports.SerialPort.CatchReceivedEvents(Obj ect src, SerialDataReceivedEventArgs e)at System.IO.Ports.SerialStream.EventLoopRunner.CallR eceiveEvents(Objectstate)at System.Threading.ThreadPool.WorkItem.doWork(Object o) at System.Threading.Timer.ring()