[单选题]

(18)在窗体上有一个文本框Text1、Text属性值为空,然后编写下列事件过程: Privte 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

参考答案与解析:

相关试题

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

[单选题]在窗体上有一个文本框Text1,Text属性值为空,然后编写下列事件过程:Private Sub Text1 KeyPress(KeyAscii As Integer)D.im str As String,n As Integerstr=UCase(Chr(KeyAscii))n=Len(str)Text1.Text=String(n,str)E.nd Sub程序运行后,若在文本框中输入单字母“p”,则在文本框Text1中显示的内容为( )。A.ppB.pPC.PPD.Pp

  • 查看答案
  • 在窗体上有一个文本框Text1,Text属性值为空,然后编写如下事件过程:Pri

    [单选题]在窗体上有一个文本框Text1,Text属性值为空,然后编写如下事件过程:Private Sub Text1_KeyPress(Key Ascii As Integer)Dim str As String, n As Integer str=UCase(Chr(Key Ascii)) n=Len(str) Text1.Text=String(n,str) End Sub 程序运行后,若在文本框中输入单字母“p”,则在文本框Text1中显示的内容为( )。A.ppB.pPC.PPD.Pp

  • 查看答案
  • 在窗体上有一个文本框,其名称为Text1,编写下列事件过程:Private Su

    [单选题]在窗体上有一个文本框,其名称为Text1,编写下列事件过程:Private Sub Text1_KeyPress(KeyAscii As Integer)D.im str As Stringstr=Chr(KeyAscii)KeyAscii=Asc(UCase(str))Text1.Text=Stririg(2,KeyAscii)E.nd Sub程序运行后,如果在键盘上输入字母“a”,则在文本框Text3中显示的内容为( )。A.aaaB.AAAC.AAD.aa

  • 查看答案
  • (17)在窗体上有一个文本框,其名称为Text1,编写下列事件过程: Priva

    [单选题](17)在窗体上有一个文本框,其名称为Text1,编写下列事件过程: Private Sub Text1_KeyPress(KeyAscii As Integer ) Dim str As String Str=Chr(KeyAscii) KeyAscii=Asc(UCase(str)) Text1.Test=String(2,KeyAscii) End Sub 程序运行后,如果在键盘上输入字母“a”则在文本框Text3中显示的内容为 A.aaa B.AAA C.AA D.aa

  • 查看答案
  • ( 11 )在窗体上画 1 个文本框,名称为 Text1 ,然后编写下列事件过程

    [试题]( 11 )在窗体上画 1 个文本框,名称为 Text1 ,然后编写下列事件过程:Private Sub Form_Load( )Open"d:/temp/dat.txt"For Output As#1Text1.Text= “ “E.nd SubPrivate Sub Text1_KeyPress(KeyAscii As Integer)lf ( 13 ) =13 ThenIf UCase(Text1.Text)= ( 14 ) ThenC.lose 1E.ndE.lseWrite#1 ,

  • 查看答案
  • (13)在窗体上画一个文本框(其Name属性为Text1),编写下列事件过程,运

    [试题](13)在窗体上画一个文本框(其Name属性为Text1),编写下列事件过程,运行结果是。 Private Sub Form_Load() Show Text1.Text="你好!" Text1.SetFocus For i=1 To 15 Sun=Sun+i Next i Text1.Text=Sun End Sub

  • 查看答案
  • 设在窗体上有个文本框,然后编写如下的事件过程 Private Sub Text1

    [单选题]设在窗体上有个文本框,然后编写如下的事件过程Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)C.onst Alt=4C.onst Key_F2=&H71altdown%=(Shift And Alt) > 0f2down%=(KeyCode=Key_F2)If altdown% And f2down% ThenText1.Text="BBBBB"E.nd IfE.nd Sub上述程序运行后,如果按(S

  • 查看答案
  • 设在窗体上有个文本框,然后编写如下的事件过程。Private Sub Text1

    [单选题]设在窗体上有个文本框,然后编写如下的事件过程。 Private Sub Text1_KeyDown(KeyCode As Integef,Shift As Integer) Const Alt=4 ConstKey_F2=&H71 altdown%=(Shift And Alt)>0 f2down%=(KeyCode=Key_F2) If altdown% And f2down% Then Text1.Text= "BBBBB" End If End Sub 上述程序运行后,如果按[

  • 查看答案
  • 设在窗体上有个文本框,然后编写如下的事件过程:Private Sub Text1

    [单选题]设在窗体上有个文本框,然后编写如下的事件过程:Private Sub Text1_KeyDown(KeyCode As Integer,Shift As Integer)C.onst Alt=4C.onst Key_F2=&H71altdown%=(Shift And Alt)>0f2down%=(KeyCode=Key_F2)If altdown% And f2down% ThenText1.Text="BBBBB"E.nd IfE.nd Sub上述程序运行后,如果按“Shift+

  • 查看答案
  • 在窗体上画一个文本框(其Name属性为Text1),然后编写如下事件过程: Pr

    [单选题]在窗体上画一个文本框(其Name属性为Text1),然后编写如下事件过程:Private Sub Form_load()Text1.Text=″″Text1.SetFocusF.or i=1 To 9Sum=Sum+iNext iText1.Text=SumE.nd Sub上述程序的运行结果是A.在文本框Text1中输出45B.在文本框Text1中输出0C.出错D.在文本框Text1中输出不定值

  • 查看答案
  • (18)在窗体上有一个文本框Text1、Text属性值为空,然后编写下列事件过程