Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Label1.Text = "เช็คเวอร์ชั่น"
Dim args(2) As Object
args(0) = "http://xxxx/patch/version.php"
args(1) = "http://xxxx/patch/launchV.php"
args(2) = "test"
BackgroundWorker1.RunWorkerAsync(args)
End Sub
Private Sub backgroundWorker1_DoWork(ByVal args As Object, ByVal e As DoWorkEventArgs) Handles BackgroundWorker1.DoWork
Dim client As WebClient = New WebClient()
Dim versiongame As String = client.DownloadString(args(0))
Dim versionlaunch As String = client.DownloadString(args(1))
End Sub
Private Sub backgroundWorker1_RunWorkerCompleted(ByVal args As Object, ByVal e As RunWorkerCompletedEventArgs) _
Handles BackgroundWorker1.RunWorkerCompleted
Me.Label1.Text = "เสร็จ"
End Sub
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Label1.Text = "เช็คเวอร์ชั่น"
Dim args(2) As Object
args(0) = "http://xxxx/patch/version.php"
args(1) = "http://xxxx/patch/launchV.php"
args(2) = "test"
BackgroundWorker1.RunWorkerAsync(args)
End Sub
Private Sub backgroundWorker1_DoWork(ByVal sender As Object, ByVal e As DoWorkEventArgs) Handles BackgroundWorker1.DoWork
'เพิ่มตรงนี้ลงไปครับ
Dim args As Object() = DirectCast(e.Argument, Object())
Dim client As WebClient = New WebClient()
Dim versiongame As String = client.DownloadString(args(0))
Dim versionlaunch As String = client.DownloadString(args(1))
End Sub
Private Sub backgroundWorker1_RunWorkerCompleted(ByVal sender As Object, ByVal e As RunWorkerCompletedEventArgs) _
Handles BackgroundWorker1.RunWorkerCompleted
Me.Label1.Text = "เสร็จ"
End Sub