C#图片控件中加图片

 1    DialogResult dr = ofdAddUserPicture.ShowDialog();
2 this.picPicture.Image = Image.FromFile(ofdAddUserPicture.FileName); //显示图片
3 if (dr == DialogResult.OK)
4 {
5 user.Picture = ofdAddUserPicture.FileName;
6 }
7 else
8 {
9 user.Picture = null;
10 }

转载于:https://www.cnblogs.com/lanbaoming/archive/2011/08/27/2155523.html

你可能感兴趣的:(C#图片控件中加图片)