I have written a program with multiple threads, the two main ones are the UI threads and the Background worker thread running communications to a serialPort using a IO.MemoryStream...
The problem I am running into is that I am getting the a Cross Thread Operation not valid exception. I have researched this problem but all seem to be refering to assing a value to a control on the UI. I am actually doing the opposite. I need to access the SelectedItem function of a combobox Here is a sample of the code.
//cboSweep is an array of ComboBoxes on my Form.
readMessage.sweep = (short) (cboSweep[chnum - 1].SelectedIndex + 1);