I'm not sure wether this topics has been disscussed before or not, but im not sure the exact word to search for it. What method/class should i used?? Any references/solution are very thankful. Thank you very much.
The program has 3 button: 1) for folder browsing, 2) scan for the selected folder content, and 3) open the file. When user browse the selected folder(1), user click scan button to scan from the first file until the last available files and listed it text box(2) and from that user can decide whether to open the files or not(3).
Here are what have i done so far..(no 1 & 3 ):
//for browse
private void browse2()
{
string strPath;
string strCaption = "Select a Directory and folder.";
DialogResult dlgResult;
Shell32.ShellClass shl = new Shell32.ShellClass();
Shell32.Folder2 fld = (Shell32.Folder2)shl.BrowseForFolder(0, strCaption, 0,
System.Reflection.Missing.Value);
if (fld == null)
{
dlgResult = DialogResult.Cancel;
}
else
{
strPath = fld.Self.Path;
dlgResult = DialogResult.OK;
this.txtDest.Text = strPath.ToString();
}
}
//for open folder
private void btnOpen_Click(object sender, EventArgs e)
{
try
{
Process.Start(txtDest.Text);
}
catch
{
MessageBox.Show("Please select one file/folder");
}
}

New Topic/Question
Reply




MultiQuote





|