VB.NET code for running multiple threads
How to I run multiple threads in VB.NET?
Say I need 2 threads - one that prints 100 numbe开发者_StackOverflow中文版rs in a loop and the second one that asks for the user's name and prints it inside a message box.
I would use 2 BackgroundWorker objects one for each operation that you want to execute. Using the background workers ProgressChanged
event will ensure that you don't need to marshal the results back to the UI as the BackgroundWorker already takes care of this for you.
精彩评论