0

im having problems with the OpenFileDialog. I use it for select an image in my project. The problem is that i need (well, i want) limit the access to only one and speficic folder (for example c:\secretProyect\images ). Is it possible?

RealSeik
  • 147
  • 1
  • 8
  • http://stackoverflow.com/questions/1635846/c-sharp-openfiledialog-lock-to-directory – Ric Oct 05 '13 at 12:04

1 Answers1

0

You can't do that with the standard OpenFileDialog. You can create a custom OpenFileDialog yourself, maybe using a ListView to list the files under the secret path.

Or you can check the file after OpenFileDialog returns, and reject if the user select files from forbidden passages.

fxam
  • 3,874
  • 1
  • 22
  • 32