0
4

2 回答 2

3

您可以在显示标签的表单的控件集合中使用标签名称。

   For i as integer = 0 to 49 Step 1
      Me.Controls("Label" & i.toString).Text = "Something"
   Next
于 2013-09-02T13:25:05.793 回答
0

可能是这样的?

Dim lbl As Label() = New Label(9) {}
Dim nr As Integer = 0

Do
    lbl(nr) = New Label()
    lbl(nr).Text = "somthing " & nr
    nr += 1
Loop While nr <> 4
于 2013-09-02T13:09:47.717 回答