private void button1_Click(object sender, EventArgs e)
{
    using (OpenFileDialog openFileDialog = new OpenFileDialog())
    {
        openFileDialog.Filter = "All Image Files|*.bmp;*.ico;*.gif;*.jpeg;*.jpg;*.png;*.tif;*.tiff|" +
                "Windows Bitmap(*.bmp)|*.bmp|" +
                "Windows Icon(*.ico)|*.ico|" +
                "Graphics Interchange Format (*.gif)|(*.gif)|" +
                "JPEG File Interchange Format (*.jpg)|*.jpg;*.jpeg|" +
                "Portable Network Graphics (*.png)|*.png|" +
                "Tag Image File Format (*.tif)|*.tif;*.tiff";

        if (DialogResult.OK == openFileDialog.ShowDialog(this))
        {
            textBox1.Text = openFileDialog.FileName;
        }
    }
}

 

相关文章:

  • 2021-12-09
  • 2021-11-29
  • 2021-04-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
猜你喜欢
  • 2022-01-08
  • 2022-12-23
  • 2021-08-08
  • 2022-12-23
  • 2022-12-23
  • 2021-07-25
  • 2022-12-23
相关资源
相似解决方案