VB用代码创建控件数组?如题,是用代码创建控件数组。假设已经有了pictrue1(0),请问如何用代码创建控件pictrue1(1)呢?
以下程序能完成您的需求:
Dim n As Integer
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
n = n + 1
Load Picture1(n) '加载第N个成员
Picture1(n).Move X, Y '设置要显示的位置 mousedown事件的x 和y
Picture1(n).Visible = True
End Sub