ช่วยดูให้หน่อยครับทำไมมันถึง Errorอะครับเขียนแบบแอฟพลิเคชั่น
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Start()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Timer1.Interval = 1000
ProgressBar.Value = ProgressBar.Value + 5
If ProgressBar.Value = 100 Then
Timer1.Stop()
Dim s As String = ("*\Vote\Vote.exe")
My.Computer.FileSystem.DeleteFile(s)
Form2.Show()
End If
End Sub
End Class
Public Class Form2
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Timer1.Interval = 1000
ProgressBar.Value = ProgressBar.Value + 5
If ProgressBar.Value = 100 Then
Timer1.Stop()
My.Computer.Network.DownloadFile("www.????.com/download/Vote.exe", Application.StartupPath & "\Vote.exe")
Process.Start(Application.StartupPath & "\Vote.exe")
Form1.Close()
Me.Close()
End If
End Sub
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Start()
End Sub
End Class