

This will display a message box saying Done when the worker finishes the task assigned to it.

Modify the RunWorkerCompleted event to capture the task finished event of the BackgroundWorker as follows: Private Sub BackgroundWorker1_RunWorkerCompleted(ByVal sender As Object, ByVal e As ) Handles BackgroundWorker1.RunWorkerCompleted as follows: BackgroundWorker1.RunWorkerAsync() 'Do the time consuming background task hereĬalling the BackgroundWorker to perform the task can be done at any event like Button_Click, Textbox_TextChanged, etc. The primary purpose of this system is to create and save new data of students, Grades of the specific term of the school year.

Something like this: Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As ) Handles BackgroundWorker1.DoWork This application was created using Visual basic.Net, and the database support of this system is designed in Microsoft Access. This is how the BackgroundWorker appears after adding it.ĭouble click on the added control to get the BackgroundWorker1_DoWork event and add the code to be executed when the BackgroundWorker is called. VB.NET is a fully object-oriented programming language implemented on the. Short-Circuiting Operators (AndAlso - OrElse)Įxecuting a task with the background worker.ĭouble Click on the BackgroundWorker control from the Toolbox The Visual Basic.NET (VB.NET) programming language was first released by Microsoft in 2002 to replace the classic VB 6.Accessing GUI components in BackgroundWorker.
