'Form1中:
Private Sub Command1_Click()
Form2.Show
End Sub
Private Sub Form_Load()
Dim i As Integer
Text1(0).Text = ""
For i = 1 To 16
Load Text1(i)
If i Mod 2 = 1 Then
Text1(i).Left = Text1(i - 1).Left + 1500
Text1(i).Top = Text1(i - 1).Top
Else
Text1(i).Left = Text1(0).Left
Text1(i).Top = Text1(i - 1).Top + 500
End If
Text1(i).Visible = True
Next i
Command1.Caption = "显示Form2"
End Sub
Private Sub Text1_Change(Index As Integer)
sj(Index) = Text1(Index).Text
End Sub
'Form2中:
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim i As Integer
Text1(0).Text = sj(0)
For i = 1 To 16
Load Text1(i)
If i Mod 2 = 1 Then
Text1(i).Left = Text1(i - 1).Left + 1500
Text1(i).Top = Text1(i - 1).Top
Else
Text1(i).Left = Text1(0).Left
Text1(i).Top = Text1(i - 1).Top + 500
End If
Text1(i).Visible = True
Text1(i).Text = sj(i)
Next i
Command1.Caption = "关闭"
End Sub
'标准模块Module1中:
Public sj(16) As String
这个最好用控件组,比较方便