Excel 2007-style folder browse dialog
-
06-07-2019 - |
Question
Excel 2007 uses an updated/custom version of the standard Windows folder browse dialog, which you can see if you navigate to Office Button -> Excel Options -> Save -> Server drafts location -> Browse...
Our client wants us to use that dialog instead of the standard C# FolderBrowserDialog
- is this possible (i.e. what Win32 DLLs/API calls would need to be made), and more to the point, would it be legal?
Solution
The Application.FileDialog object should give you what you're looking for. You can customise it to allow multi-select, set the initial folder, set a file type filter, etc. No API calls required
OTHER TIPS
In Windows 7 (possibly vista) you might be able to find the code in here.
http://code.msdn.microsoft.com/WindowsAPICodePack
I've noticed they finally got rid of the old folder browser in 7 with a new one that looks like an open file dialog, but I'm not sure how to implement it.