Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to lock top and left hand navigation in OpenFileDialog box in C#?

enter image description hereI am having difficulty in customizing OpenFileDialog box, I want to allow people to select files that are in the same directory from the currently open folders using the OpenFileDialog. I don't want the OpenFileDialog to be able to select stuff outside of the program's current directory

Due to some reason i am not able to post image, what i meant is to lock Top navigation and Side Navigation option in OpenFileDialog box

like image 901
Vaibhav Srivastava Avatar asked Nov 13 '22 17:11

Vaibhav Srivastava


1 Answers

As far as I know you can only add elements to the standard file dialogs (using some esoteric api calls), but there is no way to remove elements. Your best bet, if you really need this functionality, is to implement your own custom Open File Dialog with the specific business rules you need.

Here are some details on how to do some limited customizations.

http://msdn.microsoft.com/en-us/magazine/cc300434.aspx

http://www.codeproject.com/Articles/16276/Customizing-OpenFileDialog-in-NET

Customizing OpenFileDialog

like image 66
Bradley Uffner Avatar answered Nov 23 '22 23:11

Bradley Uffner