Professional Documents
Culture Documents
Dim percent = 0
Dim red
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
percent = (ListBox2.Items.Count / ListBox1.Items.Count) * 100
If (ListBox1.SelectedIndex < ListBox1.Items.Count - 1) Then
ProgressBar1.Value = percent
Label2.Text = "Scanning For: " & ListBox1.SelectedItem
ListBox2.Items.Add("Scanning: " & ListBox1.SelectedItem)
Try
If Dir(ListBox1.SelectedItem.ToString) <> "" Then
ListBox3.Items.Add("Threat Found: " &
ListBox1.SelectedItem.ToString)
ElseIf Dir(ListBox1.SelectedItem.ToString, FileAttribute.Hidden) <>
"" Then
ListBox3.Items.Add("Threat Found: " &
ListBox1.SelectedItem.ToString)
Else
End If
Catch ex As Exception
End Try
ListBox1.SelectedIndex += 1
Else
If ListBox3.Items.Count - 1 >= 1 Then
ListBox3.SelectedIndex = 0
Button3.Enabled = True
End If
Timer1.Stop()
ProgressBar1.Value = 100
Label2.Text = "Finished Scanning. " & ListBox3.Items.Count & "Threat(s)
Found!"
Button2.Enabled = False
Button1.Enabled = True
End If
End Sub