Pale
August 4th, 2008, 11:05 PM
Recently i have been learning how to create a multi-threaded application.
I have three items: textbox1, texbox2, and label1
In the non - UI thread i need the information from textbox1, and textbox2 for the thread to run successfully.
i plan on using a for loop to do a certain command a certain amount of times specified by my for loop ('<=10').
I also need to update label1.text on every time it goes through the for loop,
every time it goes through the for loop i need to update my int count by increments of 1 ('count++').
so 'label1.text = "Count: " + count.ToString();'
I have read a few articles on using delegates to do this but i need help "Understanding" it.
Can someone show me a quick example on how to do that?
I have created my own thread i do not use the background worker.
Thanks,
Pale.
I have three items: textbox1, texbox2, and label1
In the non - UI thread i need the information from textbox1, and textbox2 for the thread to run successfully.
i plan on using a for loop to do a certain command a certain amount of times specified by my for loop ('<=10').
I also need to update label1.text on every time it goes through the for loop,
every time it goes through the for loop i need to update my int count by increments of 1 ('count++').
so 'label1.text = "Count: " + count.ToString();'
I have read a few articles on using delegates to do this but i need help "Understanding" it.
Can someone show me a quick example on how to do that?
I have created my own thread i do not use the background worker.
Thanks,
Pale.