Thread Maintenance and Synchronization

So far, you have started threads using the Start method, and they have died naturally. It is also possible to suspend, restart, and kill threads. You can check the states of threads at any time. Threads can also be assigned priorities, which control the size of the time slice they are given by the processor. In addition, threads can be foreground or background threads.

Foreground and Background Threads

Given the current state of your application, there is something interesting you can do with it. If you run the application and click the Pass Params button, the code will execute and two message boxes eventually will be displayed, one from each of the threads you created. When the message boxes are displayed, ...

Get A Programmer's Introduction to Visual Basic® .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.