版主 你说的那个我懂
那我把代码发上去,你在创建以下你一看就知道了
dim num as integer
Private Sub Command1_Click()
num = num + 1
Load Picture1(num + 1)
Load Label1(num + 1)
Picture1(num + 1).Left = Picture1(num).Left + 1455
Picture1(num + 1).Top = Picture1(num).Top
Label1(num + 1).Left = Picture1(num + 1).Left
Label1(num + 1).Top = Picture1(num + 1).Top + 960
If Picture1(num + 1).Left > Form1.Width Then
Picture1(num + 1).Left = 120
Label1(num + 1).Left = 120
Picture1(num + 1).Top = Picture1(num).Top + 1215
Label1(num + 1).Top = Label1(num).Top + 1215
If Picture1(num + 1).Top + 1445 > Form1.Height Then
m = MsgBox("以添加到底层了,是否新建一容器?", vbOKCancel, "空间不足!")
End If
Else
Picture1(num + 1).Top = Picture0(num).Top
Picture1(num + 1).Left = Picture0(num).Left + 1320
End If
Picture1(num + 1).Visible = True
Picture1(num + 1).Picture = LoadPicture("")
Label1(num + 1).Visible = True
End Sub
添加控件后通过快结菜单对图片框加入图片
谢谢 麻烦了