I'm modifying my SmartProtect code to allow my application to choose folders that can be protected. However, currently, .NETCF does not have any FolderBrowserDialog method so there's no way for you to browse folders.
Instead of re-inventing the wheel, I was looking for codes that I can freely integrate and modify to so that it is able to choose folders instead of just files and I saw a post from http://www.mobilepractices.com/2008/02/custom-openfiledialog-implementation.html. (Anyway I've seen Mr. Peter Foot's one but I feel this implementation is cleaner and much more easier to scale)
However, this implementation does not allow you to choose folder so since the author allows us to freely modify the code, I did some modification to allow it to choose Folders instead of just Files. The modified code is here :
To use this code so that you can filter out the folders, just add :
the code will then filter only the directory and it will allow you to select the folders.
Anyway, I've also added a bonus. You can change the title of the form by adding filter.title="Choose a Folder"
Thanks tofor a very good code.