在flowLayoutPanel中成功插入了PictureBox,我想点击PictureBox,然后弹出一个窗口显示pictureBox中图片,
PictureBox picture = new PictureBox();
picture.Image = Image.FromFile(TheFolder.GetFiles()[i].DirectoryName + "\\" + TheFolder.GetFiles()[i].Name); //获取文件
this.flowLayoutPanel1.Controls.Add(picture);
然后我写了个点击PictureBox的处理函数,运行时候点击PictureBox没有任何反应
private void picture_Click_1(object sender, EventArgs e)
{
new Form2().Show();
}
求大大指教
长风秋雁
相关分类