VERSION 5.00
Begin VB.Form Form2 
   Caption         =   "Form2"
   ClientHeight    =   4920
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6540
   LinkTopic       =   "Form2"
   ScaleHeight     =   4920
   ScaleWidth      =   6540
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton cmdLoad 
      Caption         =   "Load"
      Height          =   330
      Left            =   4725
      TabIndex        =   1
      Top             =   4410
      Width           =   1275
   End
   Begin VB.TextBox Text1 
      Height          =   330
      Index           =   0
      Left            =   630
      TabIndex        =   0
      Text            =   "Text1"
      Top             =   315
      Visible         =   0   'False
      Width           =   330
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False




Sub LoadArray()
    Dim x As Integer
    Dim y As Integer
    Dim i As Integer
    Dim txt As TextBox
    Const LEFT_MARGIN = 1000
    Const TOP_MARGIN = 1000
    
    For x = 20 To 1 Step -1
        For y = 20 To 1 Step -1
            i = i + 1
            Load Text1(i)
            
            Text1(i).Left = LEFT_MARGIN + x * Text1(0).Width
            Text1(i).Top = TOP_MARGIN + y * Text1(0).Height
        Next
    Next
    
    'this makes the display faster
    For Each txt In Text1
        txt.Visible = txt.Index > 0
    Next
            

End Sub

Private Sub cmdLoad_Click()
    LoadArray
End Sub

