C#中怎么获取picturebox中当前图片的完整路径??
来源:百度知道 编辑:UC知道 时间:2024/06/16 23:56:20
要代码~
最好完整一点~
谢!
最好完整一点~
谢!
private void Form1_Load(object sender, EventArgs e)
{
string path = this.pictureBox1.ImageLocation;
textBox1.Text = path;
}
获取或设置要在 PictureBox 中显示的图像的路径或 URL。
首先,添加一个打开图片的opfiledialog1控件,然后添加button的单击事件
private void button1_click(...)
{
string path=openfiledialog.filename;
}
我用的是VS03.没找到ImageLocation这个属性.....
string path = this.pictureBox2.ImageLocation;