Adding Flavor to the OpenFileDialog and SaveFileDialog
CodeProject - Extend OpenFileDialog and SaveFileDialog the easy way
"If you used WinForms, chances are that at some point you wanted to extent the OpenFileDialog or SaveFileDialog, but you have given up because there is no easy way to do it, especially if you wanted to add some new graphical elements. Even in the MFC days such a task was not as daunting as it is for .Net because these classes are sealed, exposing only 16 properties, 5 methods and 3 events that can be used to customize the dialogs. Martin Parry's article on MSDN [^] can give you an insight at how you can customize the OpenFileDialog using the OFNHookProc function. It would look like we have to roll back the clock to early 1990's way of programming and add quite a bit of PInvoke and marshalling to do anything. This is probably enough to give up or look to alternatives like third party libraries. However, CastorTiu's article[^] made life A LOT EASIER on those who chose to customize these dialogs. Using his great work on this topic I tried to take it even further and make customizing of these two dialogs even more painless. I will focus only on my refactoring and improvements to his original hard work, so if you need details please check his/her article.
..."
This is an interesting and cool Project...
Another of those I will want to look at the next time I need a OpenFileDialog or SaveFileDialog that just a little extra seasoning. (Can you tell I'm hungry? :)
Related Past Post XRef:
Customized .Net OpenFileDialog in C#(OpenFileDialogEx)
No comments:
Post a Comment