日期:2014-05-18  浏览次数:20765 次

文件夹选择框
谁那里有文件夹选择的代码,要JSP的,谢谢大家了!

------解决方案--------------------
你参考一下这个

public class FolderDialog : FolderNameEditor
{
FolderNameEditor.FolderBrowser fDialog = new System.Windows.Forms.Design.FolderNameEditor.FolderBrowser();
public FolderDialog()
{
}
public DialogResult DisplayDialog()
{
return DisplayDialog( "请选择一个文件夹 ");
}

public DialogResult DisplayDialog(string description)
{
fDialog.Description = description;
return fDialog.ShowDialog();
}
public string Path
{
get
{
return fDialog.DirectoryPath;
}
}

~FolderDialog()
{
fDialog.Dispose();
}
}

使用:
FolderDialog openFolder = new FolderDialog();
openFolder.DisplayDialog();