Try Using scanbox As New TextBox() Dim read As String = My.Computer.FileSystem.ReadAllText("virusSig.txt") ProgressBar1.Increment(1) detected.Text = Conversions.ToString(CheckedListBox1.Items.Count) files.Text = Conversions.ToString(ProgressBar1.Value) scanbox.Text = read.ToString Using md5 As MD5CryptoServiceProvider = New MD5CryptoServiceProvider() Dim f As FileStream = New FileStream(ListBox1.SelectedItem, FileMode.Open, FileAccess.Read, FileShare.Read, 8192) f = New FileStream(ListBox1.SelectedItem, FileMode.Open, FileAccess.Read, FileShare.Read, 8192) md5.ComputeHash(f) Dim hash As Byte() = md5.Hash Dim buff As StringBuilder = New StringBuilder() Dim hashByte As Byte For Each hashByte In hash buff.Append(String.Format("{0:X2}", hashByte)) Next If scanbox.Text.Contains(buff.ToString) Then CheckedListBox1.Items.Add(ListBox1.SelectedItem) End If End Using End Using Catch ex As Exception End Try
myTreeView.SelectedNode
ListBox1.SelectedItem
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)