Restrict the user to a particular folder in OpenFileDialog Control

  • Thread starter Thread starter Paras Wadehra
  • Start date Start date
P

Paras Wadehra

Hi Friends,

Can anyone please help me with the OpenFileDialog Control in VB.Net? I want
the user to be restricted to a particular folder only for selecting a file,
i.e. they should not be able to change the directory in the OpenFileDialog!

Is there a way to implement this? Please let me know.

Thanks,
Paras Wadehra

You One Stop Entertainment Guide - http://www.paras.2ya.com/
 
Hi,

There is no way in the Manged Open File Dialog to restrcit the user from
selecting from a particular directory only. I would suggest you use a listbox
and populate it with Directory.GetFiles listings to list all the files in
your current directory and then allow the user to choose only amongst them.

Regards,
Saurabh Nandu
[ www.AksTech.com ]
[ www.MasterCSharp.com ]
 
Back
Top