用 Load 复制数组控件时遇到的问题
vb吧
全部回复
仅看楼主
level 1
快樂钚哆 楼主
添加一个Picture控件和一个Label控件(Label在Picture里),分别把Index设置为0。我用Load Picture1(Picture1.Count-1)Load Label1(Label1.Count-1)然后设置Visual为True和其它属性。我的意思是动态添加Picture和Label控件,而且新增加的Label在新的Picture里面。。但是我遇到这么一个问题。新增加的Label不在新的Picture里,而是在Picture(0)里面。该怎么做??
2008年01月12日 14点01分 1
level 13
'先将你的Picture1与Label1的 Index 都设为 0Option ExplicitDim i&Private Sub Form_Load() Set Label1(0).Container = Picture1(0) Picture1(0).Move 0, 0 Label1(0).Move 0, 0 For i = 1 To 5 Load Picture1(i) Load Label1(i) Picture1(i).Visible = True Picture1(i).Move Picture1(0).Left, Picture1(0).Top + Picture1(0).Height * i Label1(i).Visible = True Set Label1(i).Container = Picture1(i) Label1(i).Move 0, 0 Next iEnd Sub
2008年01月12日 15点01分 2
level 1
快樂钚哆 楼主
测试通过。谢谢老师。
2008年01月12日 15点01分 3
1