对窗体编写如下代码: Option Base 1 Private Sub Form_ KeyPress (KeyAscii As Integer) a=Array(237,126,87,48,498) m1=a(1) m2=1 If KeyAscii=13 Then For i=2 To 5 If a(i)>m1 Then m1=a(I) m2=i End If Next i End If Print m1 Print m2 End Sub 程序运行后,按回车键,输出结果为______ 。A. 48 4B.237 1C.498 5D.498 4
对窗体编写如下代码: Option Base 1 Private Sub Form_ KeyPress (KeyAscii As Integer) a=Array(237,126,87,48,498) m1=a(1) m2=1 If KeyAscii=13 Then For i=2 To 5 If a(i)>m1 Then m1=a(I) m2=i End If Next i End If Print m1 Print m2 End Sub 程序运行后,按回车键,输出结果为______ 。
A. 48 4
B.237 1
C.498 5
D.498 4
相关考题:
把窗体的KeyPreview属性设置为Tree,然后编写如下事件过程 Private Sub Form_KeyPress(KeyAscii As Integer) Dim ch As String ch=Chr(KeyAscii) KeyAscii=Asc(UCase(ch)) Print Chr(KeyAscii+2) End Sub 程序运行后,按键盘上的“A”键,则在窗体上显示的内容是______。A. AB.BC.CD.D
把窗体的KeyPreview属性设置为True,然后编写如下事件过程Private Sub Form_KeyPress(KeyAscii As Integer)Dim ch As Stringch = Chr(KeyAscii)KeyAscii = Asc(UCase(ch))Print Chr(KeyAscii + 2)End Sub程序运行后,按键盘上的“A”键,则在窗体上显示的内容是( )。A.AB.BC.CD.D
在窗体上画一个文本框(Textl),然后编写如下事件过程: Private Sub Text1_KeyPress(KeyAscii As Integer) Dim char As String char=Chr(KeyAscii) KeyAscii=Asc(Ucase(char)) Print String(4,KeyAscii) End Sub 程序运行后,在文本框Text1中输入A,则程序在窗体上的输出结果为A.aB.AC.aaaaD.AAAA
把窗体的KeyPreview属性设置为True,然后编写如下事件过程: Prirate Sub Form_KeyPress(KeyAscii As Integer) Dim ch As String ch=Chr(KeyAscii) KeyAscii=Asc(UCase(ch)) Print Chr(KeyAscii+2) End Sub 程序运行后,按键盘上的A键,则在窗体上显示的内容是A.AB.BC.CD.D
窗体上画一个名称为Text1的文本框,然后编写如下事件过程: Private Sub Form. Load() Show TextSetFocus End Sub Private Sub Text1_ KeyPress (KeyAscii As Integer) Dim ch As String ch = Chr (KeyAscii) KeyAscii = Asc(UCase(ch)) Pint Chr(KeyAscii + 4) End Sub程序运行后,在文本框中输入abcde,则在窗体上显示的内容是______。A.abcdeB.efghiC.EFGHID.ABCDE
把窗体的KeyPreview属性设置为True,然后编写如下事件过程: Private Sub Form_KeyPress(KeyAsciiASInteger) Dim ch As String ch=Chr(KeyAscii) KeyAscii=Asc(UCase(ch)) PrintChr(KeyAscii+2) End Sub 程序运行后,按键盘上的A键,则在窗体上显示的内容是( )。A.AB.BC.CD.D
把窗体的KeyPreview属性设置为True,然后编写如下事件过程 Private Sub Form_KeyPress(KeyAscii As Integer) Dim ch As String ch=Chr(KeyAscii) KeyAscii=Asc(UCase(ch)) PrintChr(KeyAscii+2) End Sub 程序运行后,按键盘上的“A”键,则在窗体上显示的内容是A.AB.BC.CD.D
把窗体的KeyPreview属性设置为True,然后编写如下事件过程Private Sub Form_KeyPress(KeyAseii As Integer)Dim ch As Stringch=Chr(KeyAscii)KeyAscii=Ase(UCase(ch))Print Chr(KcyAseii+2)End Sub程序运行后,按键盘上的“A”键,则在窗体上显示的内容是A.AB.BC.CD.D
把窗体的KeyPreview属性设置为True,然后编写如下事件过程: Private Sub Form_KeyPress(KeyAscii As Integer) Dim Ch As String Ch=Chr(KeyAscii) KeyAscii=Asc(UCase(Ch)) Print Chr(KeyAscii+2) End Sub 程序运行后,按键盘上的A键,则在窗体上显示的内容是______。A.AB.BC.CD.D
在窗体上画1个命令按钮和1个文本框,其名称分别为Commandl和Textl,然后编写如下代码:Dim Save All As StringPrivate Sub Commandl_C1iCk()Text1.Text=Left(UCase(SaveAU),4)End SubPrivate Sub Textl_KeyPress(KeyAscii As Intege)SaveA11=Save All+Chr(KeyAscii)End Sub程序