C#--WinForm图片选择对话框的使用

来源:互联网 发布:微信开发必须80端口 编辑:程序博客网 时间:2024/05/16 05:00

程序图片对话框的使用

这里写图片描述

这里写图片描述

 //选择照片        private void btnChoseImage_Click(object sender, EventArgs e)        {            OpenFileDialog fileDialog = new OpenFileDialog();            DialogResult result = fileDialog.ShowDialog();            if(result == DialogResult.OK)            {                this.pbStu.Image = Image.FromFile(fileDialog.FileName);            }        }

这里写图片描述


清除照片

这里写图片描述

这里写图片描述

原创粉丝点击