openFileDialog1.Filter = "图片文件|*.jpg|BMP图片|*.bmp|Gif图片|*.gif"; OpenFileDialog ofd = new OpenFileDialog(); ofd.ShowDialog(); picPhoto.Image = Image.FromFile(ofd.FileName);