Reputation: 11317
private void button1_Click(object sender, EventArgs e)
{
VistaOpenFileDialog dialog = new VistaOpenFileDialog();
{
dialog.Filter = "Images (*.jpg, *.bmp, *.gif)|*.jpg;*.bmp;*.gif";
dialog.Filter = "All Files (*.*)|*.*";
};
if (dialog.ShowDialog() == DialogResult.OK)
{
textBox1.Text = dialog.FileName;
Bitmap bmp = new Bitmap(Image.FromFile(dialog.FileName),
pictureBox2.Width, pictureBox2.Height);
pictureBox2.Image = bmp;
}
}
I'm using ookii package with VistaOpenFileDialog but i guess the idea should be the same as with the regular OpenFileDialog class.
now when i click it's showing the All Files option when i expand it i can't see the first option Images.
i want that it will show first the Images option and then to be able to switch the All Files.
Upvotes: 1
Views: 276