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 is happening right now is that it starts and freezes during the cycle.
I would like another button to stop the loop when pressed.
Also, the Sleep function does not work, because I get a βHiβ warning every milliseconds.
source
share