Imports System
Imports System.Net
Imports System.IO
Imports System.Threading.Thread
Public Class Form1
Public errorz As String
Public votestatus As String
Public videoid As String
Public votetries As String
Public Sub Main()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If RadioButton1.Checked Then
votestatus = "YES"
End If
If RadioButton2.Checked Then
votestatus = "NO"
End If
videoid = TextBox1.Text
votetries = TextBox2.Text
For i As Integer = 1 To votetries Step 1
MsgBox("Hi")
Sleep(5000)
Next
End Sub
End Class
What happens right now is that it runs, and freezes during the loop.
I would like another button when clicked will stop the loop.
Also the Sleep function doesn't seem to be working because I get "Hi" alert every millisecond.