Several forms from my application use the same “open file dialog”. I need to duplicate a code for “open file dialog” and its settings every time. I want to add “open file dialog” to separate dll library to avoid duplication. How do I do it ?
WinForms, Visual Studio 2008.
If you want to place the code into a separate dll do the following:
System.Windows.FormsOpenFileDialogto the class library projectHowever, please note that as long as you only wish to use the customized file dialog within a single application, it is not required that this code lives in a separate dll. You can simply create a class with all the customization in your main project and re-use that class in all forms: