Threading using VB.Net 2005
Author: Faraz
Download Source Code : 249_ThreadApplication.zip
In this article I will explain you how you can create threads using Visual Basic.Net 2005. The class use for threading is System.Threading.
Threading is one of the interesting features provided in .Net Framework 1.0 and .Net Framework 2.0. Threads are the basic unit to which an operating system allocates processors time. Where as, each process can have more than one thread. Each thread contains information related to exception handlers, a scheduling priority, and a structure in which thread context is saved.
Threads provide the ability to an operating to run multiple applications in way that it seams that the applications are running simultaneously. But for the processor each application is running one by one according to their allocated schedule or priority. This scheduling of threads is known as Multithreading and this task of scheduling or priority setting is done by thread scheduler.
We can define multithreading as, the ability to create more than one thread inside a process. These threads serve as a multiple execution points that enable different segments of your application to run at the same time.
As I have mentioned earlier that for threading purposes in .Net Framework 1.0 and .Net Framework 2.0 we have System.Threading class that provides the facility for the user to use methods by creating threading objects.
Syntax for creating a thread object is as follows:
When the thread object is created you need to pass the pointer to the method delegate: