【VISUAL VB NET】Threads

 Imports System.Threading

Public Class Form1 Public Sub first_thread_procedure() Thread.Sleep(500) MessageBox.Show("Hello from first thread :) ... ") End Sub Public Sub second_thread_procedure() Thread.Sleep(1000) MessageBox.Show("Hello from second thread :) ... ") End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim first_thread As New Thread(New ThreadStart(AddressOf first_thread_procedure)) Dim second_thread As New Thread(New ThreadStart(AddressOf second_thread_procedure)) first_thread.Start() second_thread.Start() first_thread.Join() End Sub End Class

No comments:

Renowned Water Expert Reynold Aquino Offers Exclusive Water Softener Discounts

Los Angeles, California - November 21, 2024 - World-renowned water expert Reynold Aquino is excited to announce exclusive discounts on prem...

Contact Form

Name

Email *

Message *