OpenDialog
Way 01 使用win32控件OpenFileDialog
1 | Microsoft.Win32.OpenFileDialog ofd = new Microsoft.Win32.OpenFileDialog(); |
类似的还有 Microsoft.Win32.SaveFileDialog
Way 02 使用Forms中的OpenFileDialog控件 or FolderBrowserDialog
1 | System.Windows.Forms.OpenFileDialog openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); |
Way 03 使用win32 api
1 | BOOL WINAPI GetOpenFileName( __inout LPOPENFILENAME lpofn) |
Way 04 使用Windows API Code Pack
1 | var dialog = new CommonOpenFileDialog(); |