16,554
社区成员
发帖
与我相关
我的任务
分享
' 固定控件数量;
dim _ctl as object(9)
dim i as int32
for i=0 to 9
_ctl(0)=new windows.forms.textbox
with _ctl(0)
.location=new drawing.point(x,y) '位置
.size=new drawing.size(w,h) '尺寸;
.name="text" & i.tostring()
.text="文本" & i.tostring
end with
next
' 如果是不确定数据的就用集合;
dim _ctls as collections.arraylist
dim n as int32
_ctls=new collections.arraylist
_ctls.add(new windows.forms.textbox)
n=_ctls.count-1
with _ctls(n)
'代码上同
end with