i want open "openfiledialog", on can select local hard drives(ex. c:\,d:). want add restrictions access network drives. have used following code able access network drive. code given below..
openfiledialog dialog = new openfiledialog(); dialog.customplaces.clear(); foreach (driveinfo drive in driveinfo.getdrives()) { if (drive.drivetype == drivetype.fixed) { dialog.customplaces.add(drive.name); } } dialog.showdialog();
any appreciated. thanks
i don't think possible built-in openfiledialog
. changing customplaces
list of "custom" places want pinned on top left. doesn't limit places can go.
i think you'll have either write custom dialog (ick!) or validate selection after they've hit ok.
Comments
Post a Comment