im using forms.my process is1.Getting word files from the specified folder2.Have to add word files name to the checkedlistbox3.i want select some files from checkedlistbox so i checked some files4.i checked some item and closed the forms(ie.checkedlistbox)5.again i load the form so its again get the file from the folder, in this i need the prevoius checking item, that means prevoius checked items should be same checked position in checkedboxlist in current.
private void FormFiles_Load(object sender, EventArgs e) { this.GetFiles();
}
public void GetFiles() {
var items = checkedListBox1.Items;
DirectoryInfo dir = new DirectoryInfo(@"E:\2013\Tasks\3");
foreach (FileInfo file in dir.GetFiles("*.doc")) { File.Copy(file.FullName, file.Name, true);
items.Add(file.Name);
}}