FEB Production
Please login to see all Forum Sections!


All Programs.
 
HomeFAQRegisterLog in
Welcome and Check out are offers! new price!
FaceBook
Membership
Membership

Share | 
 

 Virus Scanner with VB

Go down 
AuthorMessage
Admin
Admin
avatar

Posts : 154
Join date : 2010-04-20
Age : 24
Location : GHOST Protected

PostSubject: Virus Scanner with VB   Tue Oct 19, 2010 6:55 am

Public Class Form1
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 ListBox1.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 found!"
Button2.Enabled = False
Button1.Enabled = True

End If
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Button1.Enabled = False
Button2.Enabled = False
Button3.Enabled = False
ComboBox1.SelectedItem = 0
ComboBox1.Items.AddRange(System.IO.Directory.GetLogicalDrives)
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ProgressBar1.Value = 0
ListBox2.Items.Clear()
ListBox3.Items.Clear()
percent = 0
Button1.Enabled = False
ListBox1.SelectedItem = 0
Timer1.Start()
Button2.Enabled = True
End Sub

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
If ComboBox1.SelectedIndex >= 1 Then
ListBox1.Items.Clear()
ListBox1.Text = My.Resources.VirusList.ToString
For Each line As String In TextBox1.Lines
ListBox1.Items.Add(ComboBox1.SelectedItem.ToString & line.ToString)
Next
If ListBox1.Items.Count - 1 >= 0 Then
Label1.Text = "DataBase Loaded!"
Button1.Enabled = True
Else
Label1.Text = "No DataBase Loaded!"
Button1.Enabled = False
End If
Else
Button1.Enabled = False
ListBox1.Items.Clear()
TextBox1.Text = ""
Label1.Text = "No DataBase Loaded!"
End If
End Sub

Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click

End Sub

Private Sub Label1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label1.TextChanged
red = Replace(ListBox3.SelectedItem.ToString, "Threat Found: ", "")
Try
System.IO.File.Delete(red)
If Dir(red) <> "" Then
MsgBox("Unable to delete " & red, MsgBoxStyle.Critical)
Else
MsgBox("File " & red & " Successfully Deleted", MsgBoxStyle.Critical)
ListBox3.Items.Remove(ListBox3.SelectedItem)
End If
Catch ex As Exception

End Try
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
If ListBox3.Items.Count - 1 >= 0 Then
ListBox3.Enabled = True
Button3.Enabled = True
Else
Button3.Enabled = False
End If
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Stop()
If ListBox3.Items.Count - 1 >= 0 Then
ListBox3.SelectedIndex = 0
Button3.Enabled = True
End If
Button2.Enabled = False
Button1.Enabled = True
End Sub
End Class

_________________
<(FEB)>
-Programmer-
-Gamer-
-Owner-
Back to top Go down
http://febproductions.darkbb.com
darktricks
Software Team
Software Team


Posts : 6
Join date : 2010-04-22
Age : 27
Location : A Dark Place

PostSubject: Hmm   Sun Oct 24, 2010 11:43 am

What does this do, and how do i use it?
Back to top Go down
 
Virus Scanner with VB
Back to top 
Page 1 of 1
 Similar topics
-
» Google Redirect :100k search virus - please help!
» wuauclt.exe pop up virus on my laptop - please help!
» Virus affecting only facebook?
» Silent Switches for Software Installations
» Migraines ever feel like coming down with the flu?

Permissions in this forum:You cannot reply to topics in this forum
FEB Production :: Softwares :: FEB Softwares :: Computer Softwares-
Jump to: