How to get file path from OpenFileDialog and FolderBrowserDialog?

For OpenFileDialog: OpenFileDialog choofdlog = new OpenFileDialog(); choofdlog.Filter = “All Files (*.*)|*.*”; choofdlog.FilterIndex = 1; choofdlog.Multiselect = true; if (choofdlog.ShowDialog() == DialogResult.OK) { string sFileName = choofdlog.FileName; string[] arrAllFiles = choofdlog.FileNames; //used when Multiselect = true } For FolderBrowserDialog: FolderBrowserDialog fbd = new FolderBrowserDialog(); fbd.Description = “Custom Description”; if (fbd.ShowDialog() == DialogResult.OK) { string sSelectedPath … Read more

Select folder dialog WPF

Windows Presentation Foundation 4.5 Cookbook by Pavel Yosifovich on page 155 in the section on “Using the common dialog boxes” says: “What about folder selection (instead of files)? The WPF OpenFileDialog does not support that. One solution is to use Windows Forms’ FolderBrowseDialog class. Another good solution is to use the Windows API Code Pack … Read more

Why FolderBrowserDialog dialog does not scroll to selected folder?

The fundamental problem is a poor design decision in the FolderBrowserDialog. First, we need to realize that the FolderBrowserDialog is not a .NET control, but is rather the Common Dialog and is part of Windows. The designer of this dialog elected not to send the TreeView control a TVM_ENSUREVISIBLE message after the dialog is displayed … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)