Glenn Patton

Glenn Patton

  • NA
  • 308
  • 82.8k

Using Invoke for a delegate to avoid cross threading

Dec 19 2012 5:02 AM

Hi All,

I have written a delegate to mange data from the serial port.  I would like to use it to display the data on the form I have been told that I need to use an
Invoke to do this.  I am having some issues using the invoke command. I have an instance of the form I wish the data to be shown on

internal static Form1 myForm1;

later in the code I am using the commands:

InputData = myComPort.ReadExisting();

myForm1.Invoke(AccessFormMarshall(InputData));


I belive I have set up the Access and Marshalling correctly. I think it is the use of the invoke command correctly.

Glenn


 

  


 


Answers (6)