views:

113

answers:

1

How to I run multiple threads in VB.NET?

Say I need 2 threads - one that prints 100 numbers in a loop and the second one that asks for the user's name and prints it inside a message box.

+1  A: 

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.

Kane