单项选择题
在窗体上有一个文本框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
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
下列程序的运行结果是( )。 Private Function myfun(m,n) Do While m>n Do While m>n:m=m-n:Loop Do While n>m:n=n-m:Loop Loop myfun=m End Function Private Sub Command1_Click() Print myfun(9,8) End Sub
A.2
B.1
C.4
D.3
点击查看答案&解析
单项选择题
某程序列表框中有许多项,现在用Timer控件控制时间,0.1秒删除一项,直到删完为止,用一滚动条来显示删除的项目,请选择合适的语句,完成此程序( )。 Private Sub Command2_Click() HScroll1.Min=0 HScroll1.Max=List1.ListCount HScroll1.Value=0 Timer1.Interval= Timer1.Enabled=True End Sub Private Sub Timer1_Timern If List1.ListCount>0 Then List1.RemoveItem 0 HScroll1.Value=HScroll1.Max--Listl.ListCount Else Timer1.Enabled= MsgBox 全部删除! End If End Sub
点击查看答案&解析
相关试题
下列是一个体操评分程序。设满分为10分,...
假设有以下程序段: For i=1 To 3 ...
在程序的空白行处填写适当的语句,完成下列...
软件是程序、数据和______的集合。
在面向对象方法中,类之间共享属性和方法的...