Dim picClass() As New picClass
Private Sub Command1_Click()
Dim i As Integer
i = 0
For i = 0 To 4
Set picClass(i).pic1 = Controls.Add("vb.picturebox", "picture" & i)
picClass(i).pic1.Visible = True
picClass(i).pic1.Move 2000 + i * 300, 200, 200, 200
Next
End Sub
Private Sub Command2_Click()
For i = 1 To 5
Controls.Remove "picclass(i).pic1"
Next
End Sub
Private Sub Form_Load()
ReDim picClass(5) As New picClass
End Sub
关于用Controls.Remove "picclass(i).pic1"动态删除
是不是用类模块的的时候就不能动态删除了还是有什么其他的格式呢?
不好意思有麻烦了
Private Sub Command1_Click()
Dim i As Integer
i = 0
For i = 0 To 4
Set picClass(i).pic1 = Controls.Add("vb.picturebox", "picture" & i)
picClass(i).pic1.Visible = True
picClass(i).pic1.Move 2000 + i * 300, 200, 200, 200
Next
End Sub
Private Sub Command2_Click()
For i = 1 To 5
Controls.Remove "picclass(i).pic1"
Next
End Sub
Private Sub Form_Load()
ReDim picClass(5) As New picClass
End Sub
关于用Controls.Remove "picclass(i).pic1"动态删除
是不是用类模块的的时候就不能动态删除了还是有什么其他的格式呢?
不好意思有麻烦了
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货