Click to See Complete Forum and Search --> : Updating listBox from another thread.


AndyHey
March 31st, 2003, 04:56 AM
Hi,

I have read and read and am still confused.

I have a simple windows forms application that on a button press spawns a new thread whic in turn starts up a multicast listener. I am 99.9% sure this is working fine, however in my main thread I draw the GUI hich includes a list Box. The problems are arising when i try to update the ListBox with the data received from the multicast listener. The application reports that it basically doesn't know what the list box is.

Any ideas or pointers would be greatly appreciated. Code examples even more greatly received!!

thanks in advance

Andy

AndyHey
April 1st, 2003, 01:35 AM
anyone?

Scott MacMaster
April 1st, 2003, 11:20 AM
Maybe, if you post some code I can spot something.

pareshgh
April 1st, 2003, 12:23 PM
AndyHey,

for what purpose you are using Thread for ? isn't it possible thru Timers. which has less overcode !!!!

Paresh

petru66
April 17th, 2003, 11:11 AM
I think you should take care of the threading issues when trying to modify something on a form. Have a look at this page:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnforms/html/winforms06112002.asp

Hope this helps.