单项选择题

在窗体上有一个文本框Text1,Text属性值为空,然后编写下列事件过程:

Private Sub Text1 KeyPress(KeyAscii As Integer)

Dim str As String,n As Integer

str=UCase(Chr(KeyAscii))

n=Len(str)

Text1.Text=String(n,str)

End Sub

程序运行后,若在文本框中输入单字母“p”,则在文本框Text1中显示的内容为( )。

A.pp
B.pP
C.PP
D.Pp