我想在窗体画一个Label控件数组,在.net里怎么能让它像在6.0里一样输入
以下程式码就能输出想要的数据呢。
Dim i As Integer
For i = 0 To Label1.UBound
Debug.Print Label1(i).Caption
Next i
在.net里怎么做呢,能不能给个例子呢。多谢各位。
...全文
1088打赏收藏
新手学VB.net如何用控件数组啊。谢谢各位!
我想在窗体画一个Label控件数组,在.net里怎么能让它像在6.0里一样输入 以下程式码就能输出想要的数据呢。 Dim i As Integer For i = 0 To Label1.UBound Debug.Print Label1(i).Caption Next i 在.net里怎么做呢,能不能给个例子呢。多谢各位。
3、 Controls集合
Dim ctlcurent as control
Dim chkcurrent as system.windows.forms.checkbox
For each ctlcurrent in Panel.controls
If typeof(ctlcurrent) is system.windows.forms.checkbox then
Chkcurrent =ctype(ctlcurrent, system.windows.forms.checkbox)
Chkcurrent.checked =false
End if
Next