|
void Form3_Load(object sender, EventArgs e)
{
this.checkedListBox1.Items.AddRange(System.IO.Directory.GetFiles(@"C:\", "*.*"));
this.checkedListBox1.ItemCheck += new ItemCheckEventHandler(checkedListBox1_ItemCheck);
}
void checkedListBox1_ItemCheck(object sender, ItemCheckEventArgs e)
{
Process.Start(this.checkedListBox1.Items[e.Index].ToString());
}
Do you mean to add the filenames as item of the CheckedListBox, click on which to open the file? |