Multiple file extensions in OpenFileDialog

Try: Filter = “BMP|*.bmp|GIF|*.gif|JPG|*.jpg;*.jpeg|PNG|*.png|TIFF|*.tif;*.tiff” Then do another round of copy/paste of all the extensions (joined together with ; as above) for “All graphics types”: Filter = “BMP|*.bmp|GIF|*.gif|JPG|*.jpg;*.jpeg|PNG|*.png|TIFF|*.tif;*.tiff|” + “All Graphics Types|*.bmp;*.jpg;*.jpeg;*.png;*.tif;*.tiff”

Open file dialog and select a file using WPF controls and C#

Something like that should be what you need private void button1_Click(object sender, RoutedEventArgs e) { // Create OpenFileDialog Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); // Set filter for file extension and default file extension dlg.DefaultExt = “.png”; dlg.Filter = “JPEG Files (*.jpeg)|*.jpeg|PNG Files (*.png)|*.png|JPG Files (*.jpg)|*.jpg|GIF Files (*.gif)|*.gif”; // Display OpenFileDialog by calling ShowDialog method Nullable<bool> … Read more

How do I use OpenFileDialog to select a folder?

Basically you need the FolderBrowserDialog class: Prompts the user to select a folder. This class cannot be inherited. Example: using(var fbd = new FolderBrowserDialog()) { DialogResult result = fbd.ShowDialog(); if (result == DialogResult.OK && !string.IsNullOrWhiteSpace(fbd.SelectedPath)) { string[] files = Directory.GetFiles(fbd.SelectedPath); System.Windows.Forms.MessageBox.Show(“Files found: ” + files.Length.ToString(), “Message”); } } If you work in WPF you have … Read more

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