winform中怎样实现动态加载图片框控件

2025-01-07 04:57:53
推荐回答(3个)
回答1:

先假如你是通过点击按钮(button1)动态加载图片框
双击button1,在
private void button1_click(Object sender,Eventargs e){
PictureBox pic = new PictureBox();
//设置图片框中加载的图片
pic.src="c:\meinv.jpg"
this.controls.add(pic);
}

回答2:

Dim Pic as new picturebox
me.controls.add(pic)
pic.image=new bitmap(File)

回答3:

selectchange 触发,然后加载。 ~