测试加载499个可以正常显示,你试一下 先添加一个txtLoad(0) 控件 Textbox Private Sub Form_Load() Dim i As Long Dim lX As Long, lY As Long
For i = 1 To 499 Load txtLoad(i) If i Mod 20 = 0 Then lY = txtLoad(i - 1).Top + txtLoad(i - 1).Height + 10 lX = txtLoad(0).Left Else lY = txtLoad(i - 1).Top lX = txtLoad(i - 1).Left + txtLoad(i - 1).Width + 10 End If txtLoad(i).Text = i txtLoad(i).Move lX, lY txtLoad(i).Visible = True Next End Sub
加入Refresh语句试一试
先添加一个txtLoad(0) 控件 Textbox
Private Sub Form_Load()
Dim i As Long
Dim lX As Long, lY As Long
For i = 1 To 499
Load txtLoad(i)
If i Mod 20 = 0 Then
lY = txtLoad(i - 1).Top + txtLoad(i - 1).Height + 10
lX = txtLoad(0).Left
Else
lY = txtLoad(i - 1).Top
lX = txtLoad(i - 1).Left + txtLoad(i - 1).Width + 10
End If
txtLoad(i).Text = i
txtLoad(i).Move lX, lY
txtLoad(i).Visible = True
Next
End Sub