我想双击listview上的图片 在别的窗体上的picturebox上显示 为什么不可以呢 c#
rivatevoidlistView_DoubleClick(objectsender,EventArgse){Form3form=newForm3(this);form...
rivate void listView_DoubleClick(object sender, EventArgs e)
{
Form3 form = new Form3(this);
form.ShowDialog();
// ImageList = new
form.Img = this.imageList.Images[listView.FocusedItem.ImageIndex];
form.Name = listView.SelectedItems[0].Tag.ToString();
}
另外个窗体
namespace Texture_1
{
public partial class Form3 : Form
{
private 踏入 form;
private Image img;
private string name;
public PictureBox pb = new PictureBox();
public Image Img
{
set { this.img = value; }
get { return this.img; }
}
public string Name
{
set { this.name = value; }
get { return this.name; }
}
public Form3(踏入 from)
{
InitializeComponent();
this.form = form;
}
private void Form3_Load(object sender, EventArgs e)
{
pictureBox.Image = img;
textBox.Text = name;
}
为什么不可以呢 我还想把文件路径显示在textbox下面 也错误~ 展开
{
Form3 form = new Form3(this);
form.ShowDialog();
// ImageList = new
form.Img = this.imageList.Images[listView.FocusedItem.ImageIndex];
form.Name = listView.SelectedItems[0].Tag.ToString();
}
另外个窗体
namespace Texture_1
{
public partial class Form3 : Form
{
private 踏入 form;
private Image img;
private string name;
public PictureBox pb = new PictureBox();
public Image Img
{
set { this.img = value; }
get { return this.img; }
}
public string Name
{
set { this.name = value; }
get { return this.name; }
}
public Form3(踏入 from)
{
InitializeComponent();
this.form = form;
}
private void Form3_Load(object sender, EventArgs e)
{
pictureBox.Image = img;
textBox.Text = name;
}
为什么不可以呢 我还想把文件路径显示在textbox下面 也错误~ 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询