0
我想设置所选文件夹中FolderBrowserDialog控件作为变量,这样我就可以另一种方法集SelectedPath中的FolderBrowserDialog
我到目前为止的代码中使用它的变量是:
private void button18_Click(object sender, EventArgs e)
{
DialogResult result = folderBrowserDialog1.ShowDialog();
if (result == DialogResult.OK)
{
//
// The user selected a folder and pressed the OK button.
// We print the number of files found.
//
string[] files = Directory.GetFiles(folderBrowserDialog1.SelectedPath);
MessageBox.Show("Files found: " + files.Length.ToString(), "Message");
}
}
这样我就可以在方法调用控制所选文件夹上面是这样的:
Process.Start("test.exe", <Folder Selection Here>);
请关闭此问题.. – Michael 2011-06-16 20:44:42