【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:

My New Favorite Music Genre Is Polish Noir

These 10 artists create music that is mystical, melancholy, magical, and more. ͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏    ...

Contact Form

Name

Email *

Message *