我想双击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下面 也错误~
展开
 我来答
czccom123
2012-08-14
知道答主
回答量:8
采纳率:0%
帮助的人:2.8万
展开全部
form.ShowDialog();

这句话放在最后。
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式