hi, can someone please help me, i have added a progress bar and i added a start and stop button, the start is working fine, but i dont know the coding for the stop button could someone please tell me the coding for the stop button please, here is my codng for the start button, any help would be appreciated, thanks
Code:Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim num As Integer For num = 1 To 100 ProgressBar1.Value = num lblCounter.Text = Format(num / 100, "p") lblCounter.Refresh() Threading.Thread.Sleep(100) lblvfound.Visible = True lblvfound2.Visible = False If lblCounter.Text = "100.00 %" Then lblvfound2.Visible = True ElseIf lblCounter.Text = "0.10 %" Then lblvfound.Visible = True End If Next MsgBox("The Virus Scanning Is Complete", MsgBoxStyle.OkOnly) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click End Sub




Reply With Quote