vb代码中可以使用什么语句加载控件数组元素
推荐于2018-04-04
展开全部
Private Sub Form_Load()
Dim i As Integer
For i = 1 To 3
Load Text1(i) '加载控件数组
Text1(i).Left = Text1(i - 1).Left
Text1(i).Top = Text1(i - 1).Top + 500
Text1(i).Visible = True '使其显示
Next i
End Sub
Private Sub Form_Unload(Cancel As Integer) '
Dim i As Integer
For i = 1 To Text1.UBound
Unload Text1(i) '退出时卸载控件数组
Next
End Sub
Dim i As Integer
For i = 1 To 3
Load Text1(i) '加载控件数组
Text1(i).Left = Text1(i - 1).Left
Text1(i).Top = Text1(i - 1).Top + 500
Text1(i).Visible = True '使其显示
Next i
End Sub
Private Sub Form_Unload(Cancel As Integer) '
Dim i As Integer
For i = 1 To Text1.UBound
Unload Text1(i) '退出时卸载控件数组
Next
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询