Hi, i'm kinda of a newbie in programming and i'm trying to make a program that searches for a specific file in a specific file, so when the program loads it "writes" in checked list box the names of the drives installed to the computer, but what i want to do is: when the user checks the box, i want it to search for the file in that drive, but i don't know how to do it...
I'm using:
It determines the names of the installed drives...Code:Imports System.IO Imports System.Collections.ObjectModel Public Class Form1 Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load srDrives.Enabled = False Dim allDrives() As DriveInfo = DriveInfo.GetDrives() srDrives.Items.AddRange(allDrives) End Sub
And this one searches for the file in C:\Code:Private Sub srCheck_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles srCheck.CheckedChanged If srCheck.CheckState = CheckState.Checked Then srList.Items.AddRange(Directory.GetFiles("C:\", srCombo.Text, SearchOption.AllDirectories)) End If
Any ideas on how to make it search in the other drives using the checked listbox?![]()
THANKS![]()
![]()




Reply With Quote