# Re: vb的物件可以变阵列,那自制的ocx呢???????

Posted by Vincent on January 08, 1999 at 20:20:31:

In Reply to: vb的物件可以变阵列,那自制的ocx呢??????? posted by hip on December 27, 1998 at 11:05:59:

: 目前刚做好一个ocx把他放在子表单
: 然后执行程式,到底程式要如何写才能复制物件(让它成为阵列)

首先将 Control Index 属性设成 0 然后用 Load 方式载入控制项，在将Visible 设成 True

sub CtlArray(iCount as Integer)
for i=1 to iCount
load Command1
Command1(i-1).Left=Command1.Left+ _
Command1.Width+100
Command1.Visible=True
next
end sub

Follow Ups: