第2个回答 2007-03-14
你需要建立一个text1,label1
text1的index属性设置为1,然后添加下面代码:
Dim i As Integer
Private Sub Form_Load()
Label1 = 1
End Sub
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
If Text1(i + 1) = "" And Index = i + 1 Then
Load Text1(2 + i)
Text1(2 + i).Visible = True
Text1(2 + i) = ""
Text1(2 + i).SetFocus
Text1(2 + i).Top = Text1(i + 1).Top + Text1(i + 1).Height
i = i + 1
End If
Label1 = i + 1
End Sub
运行后你会发现,你在一个TEXT输入,他的下面会出现一个新的TEXT且,LABEL里面会显示当前TEXT的个数