Dialog for opening / saving your own file (without Windows Forms or WPF)

How to import and use your own file open dialog? Do I have any advantages in an application that do not use Windows Forms or WPF? Or just a link to it?

+3
source share
3 answers

The standard file dialogs offered by WinForms and WPF are just wrappers around their own dialogs. Therefore, it makes sense to use these managed C # classes.

If you want to customize the dialogs in some way (for example, adding controls to the dialog), you may encounter a case of using your own API. But this is mainly because you need to use a different configuration method for XP from what is used for Vista / 7. Even in pure native code, setting up file dialogs is not trivial, and you really should avoid this if you can reasonably.

+6
source

Windows Code Code Pack. Windows Forms WPF, Vista, , Vista ( Windows 7) ", , , - ". , .., . - , Visual Studio, . , Code Pack.

+5

This is a question of what you are doing with your application. If it is written using Windows Forms, use System.Windows.Forms.OpenFileDialog; if it is written using WPF, see here: OpenDialog for WPF if for some special reason you should go against the Win32 api, go ahead and read GetOpenFileName here: http://msdn.microsoft.com/en-us/library /ms646927%28v=vs.85%29.aspx

+1
source

All Articles