The
FileDialog
classes are not designed this way.
The only way I can see is writing your own specialized control which does not allow to move out of initial property in principle. Doing so is easy enough. It could be based in
System.Windows.Forms.ListView
.
The files should be listed using
System.IO.Directory.GetFiles
. You should not look for directory, but you can use file mask specific to your application.
See this discussion to avoid a common pitfall discussed there:
Directory.Get.Files search pattern problem[
^].
There is one more important but advanced feature? What if is another process modifies the directory you're working with? You need some event to track is. For this purpose, use
System.IO.FileSystemWatcher
.
—SA