求大神们帮做一个Vb程序要求如下有form1,form2两个窗口,在form1中text中输入数据

求大神们帮做一个Vb程序要求如下有form1,form2两个窗口,在form1中text中输入数据(ASCII码)后按下确定按钮在form 2的text中显示相同的数据.form1有17个text,form2对应的也有17个text,求代码谢谢

'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

温馨提示:答案为网友推荐,仅供参考
第1个回答  2015-05-22
这个最好用控件组,比较方便追问

大神们求代码急啊!

相似回答