把窗体的KeyPreview属性设置为True,然后编写如下事件过程(KeyAscii As Integer)Dim ch As Stringch = Chr(KeyAscii)KeyAscii = Asc(UCase(ch))Print Chr(KeyAscii + 2)程序运行后,按键盘上的“A”键,则在窗体上显示的内容是( )。A.AB.BC.CD.D
把窗体的KeyPreview属性设置为True,然后编写如下事件过程
(KeyAscii As Integer)
Dim ch As String
ch = Chr(KeyAscii)
KeyAscii = Asc(UCase(ch))
Print Chr(KeyAscii + 2)
程序运行后,按键盘上的“A”键,则在窗体上显示的内容是( )。
A.A
B.B
C.C
D.D
相关考题:
把窗体的KeyPreView属性设置为True,并编写如下两个事件过程:Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)Print KeyCodeEnd SubPrivate Sub Form_KeyPress(KeyAscii As Integer)Print KeyAsciiEnd Sub程序运行后,如果按下B键,则在窗体上输出的数值是 【12】 和 【13】 。
在窗体上画一个命令按钮Command1和两个文本框,名称分别为Text1和Text2。编写如下两个事件过程:Dim Str1 As String,str2 As StringPrivate Sub form_load()Text1.Text=""Text2.Text=""Text1.Enabled=FalseText2.Enabled=FalseEnd SubPrivate Sub Form_KeyPress(KeyAscii As Integer)str1=str1 Chr(KeyAscii)End SubPrivate Sub Form_KeyDown(KeyCode As Integer,Shift As Integer)str2=str2 Chr(KeyCode)End SubPrivate SubCommand1_Click()Text1.Text=str1Text2.Text=str2str1=""str2=""End Sub当在设计阶段的窗体的KeyPreview属性设置为True时,程序运行过程中,在键盘上输入小写字母abc,然后单击命令按钮,则文本框Text1中显示的内容为A.abcB.不显示任何信息C.ABCD.出错
在窗体上画一个命令按钮Command1和两个文本框,名称分别为Text 1和 Text 2 Text 2。编写如下两个事件过程: Dim str As String, strl As String Private Sub form_load() TextText = " " TextText = " " TextEnabled = False TextEnabled = False End Sub Private Sub Form. KeyPress(KeyAscii As Integer) str= strChr(KeyAscii) End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) str1 = strlChr(KeyCode) End Sub Private Sub Command1_Click() TextText =str TextText = str1 str= " " str1= " " End Sub 当在设计阶段把窗体KeyPreview属性设置为True时,程序运行过程中,在键盘上输入小写字母abc,然后单击命令按钮,则文本框Text1中显示的内容为 ______ 。A.abcB.不显示任何信息C.ABCD.出错
把窗体的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
在窗体上画一个命令按钮和一个文本框,并将窗体的KeyPreview属性设置为True,然后编写如下代码: Dim SaveAll As String Private Sub Form_Load() Show Text1.Text=" " Text1.SetFocus End Sub Private Sub Command1_Click() Text1.Text = Ucase(SaveAll) End Sub Private Sub Form_KeyPress(KeyAscii As Integer) SaveAll=SaveAll+Chr(KeyAscii) End Sub 程序运行后,在键盘上输入abcdefg,单击命令按钮,则文本框中显示的内容为A.abcdefgB.不显示任何信息C.ABCDEFGD.出错
把窗体的KeyPreview属性设置为True,并编写如下两个事件过程:Private Sub Form_KeyDown(KcyCode As Integer,Shift As Integer)Print Key Code;End SubPrivate Sub Form_KeyPress(KeyAscii As Integer)Print Key AsciiEnd Sub程序运行后,如果按下A键,则在窗体上输出的数值为【 】和【 】。
在窗体上画一个文本框(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
在窗体上画一个名称为Text1的文本框,然后编写如下事件过程: Private Sub Text1_ KeyPress (KeyAscii As Integer) Dim ch As String ch = Chr (KeyAscii) KeyAscii = Asc (UCase(ch)) TextText = String(1, KeyAscii) End Sub程序运行后,使文本框拥有焦点,然后按键盘上的B键,则在文本框中显示的内容是 ______。A.bB.bbC.BBD.B
把窗体的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
在窗体上画一个文本框,然后编写如下事件过程: Private Sub Text1_KeyPress(Key Ascii As Integer) Dim char As String char=Chr(Key Ascii) KeyAscii=Asc(UCase(char)) Text1.Text=Sting(6,KeyAscii) End Sub 程序运行后,如果在键盘上输入字母“a”,则文本框中显示的内容为______。A.aB.AC.aaaaaaaD.AAAAAAA
在窗体上画一个命令按钮和一个文本框(名称分别为Command1和Text1),并把窗体的KeyPreview属性设置为True,然后编写如下代码:Dim SaveAll As StringPrivate Sub Form_ Load () Show Text1.Text=" " Text1.SetFocusEnd SubPrivate Sub Command1_ Click() Text1. Text=LCase(SaveAll)+SaveAllEnd SubPrivate Sub Form_ KeyPress (KeyAscii As Integer) SaveAll=SaveAll+Chr(KeyAscii)End Sub程序运行后,直接用键盘输入:VB,再单击命令按钮,则文本框中显示的内容为 ______。A.vbVBB.不显示任何信息C.VBD.出错
窗体上画一个名称为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
在窗体上面有一个文本框,其名称为Text1,然后编写如下事件过程: Private Sub Text1_KeyPress(KeyAscii As Integer) Dim str As String str=Chr(KeyAscii) KeyAscii=Asc(UCase(str)) TextText=String(2,KeyAscii) End Sub 程序运行后,如果在键盘上输入字母“a”,则在文本框Text1中显示的内容为( )。A.aaaB.AAAC.AAD.aa
在窗体上画一个文本框,然后编写如下事件过程。当该程序运行后,如果在键盘上输入字母“a”,则文本框中显示的内容为 ______。 Private Sub Text1_KeyPress<KeyAscii As Integer) Dim char as String char=Chr(KeyAscii) Text1.Text=String(5,KeyAscii) End SubA.aaaaaB.AAAAAC.aaaaaaD.AAAAAA
在窗体上画一个命令按钮和一个文本框,并把窗体的KeyPreview属性设置为True,然后编写如下代码: Dim SaveAll As String Private Sub Command1_Click() Text1.Text=UCase(SaveAll) End Sub Private Sub Form_KeyPress(KeyAscii As Integer) SaveAll=SaveAll+Chr(KeyAseii) End Sub 程序运行后,在键盘上输入“abcdefg”,单击命令按钮,则文本框中显示的内容为 ______ 。A.abcdefgB.不显示任何信息C.ABCDEFGD.出错
设有如下过程: Private Sub Form. KeyDpwn(KeyCode As Integer,Shift As Integer) Print Chr(KeyCode) End Sub Private Sub Form. KeyUp(KeyCode As Integer,Shift As Integer) Print Chr(KeyCode+2) End Sub 若把窗体的KeyPreview属性设置为True,程序运行后,如果按“A”键,则输出结果为( )。A. A AB. A BC. A CD. A D
把窗体的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
在窗体上画一个文本框,然后编写如下事件过程:Private Sub Text1_ KeyPress(KeyAscii As Integer) Dim char As String char=Chr(KeyAscii) KeyAscii=Asc(UCase(char)) Text1. Text= String(6,KeyAscii)End Sub程序运行后,如果在键盘上输入字母“a”,则文本框中显示的内容为______。A.aB.AC.aaaaaaaD.AAAAAAA
在窗体上画一个文本框,然后编写如下事件过程。当该程序运行后,如果在键盘上输入字母e,则文本框中显示的内容为 ______。 Private Sub Text1_KeyPress(KeyAscii As Integer) Dim char as String char=Chr(KeyAscii) KeyAscii=Asc(UCase(char)) Text1.Text=String(5,KeyAscii) End SubA.eeeeeB.EEEEEC.eeeeeeD.EEEEEE
把窗体的KeyPreview属性设置为True,然后编写如下过程: Private Sub Form_KeyDown(KeyCode As Integer,Shift As Integer) Print Chr(KeyCode) End Sub Private Sub Form_KeyUp(KeyCode As Integer,Shift As Integer) Print Chr(KeyCode+2) End Sub 程序运行后,如果按“A”键,则输出结果为 ______。A.A AB.A BC.A CD.A D
把窗体的Key Preview属性设置为True,然后编写如下过程: Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) Print Chr(KeyCode) End Sub Private Sub Form_KeyUp(KeyVode As Integer, ShiftAs Integer) Print Chr(KeyCode+2) End Sub 程序运行后,如果按“A”键,则输出结果______。A.AB.AC.AD.A A B C D
在窗体上画一个文本框,其名称为Text1,然后编写如下事件过程:Private Sub Text1_KeyPress(KeyAscii As Integer)Dim str As StringStr=Chr(KeyAscii)KeyAscii=Asc(UCase (str))Textl.Text=String(2, KeyAscii)End Sub程序运行后,如果在键盘上输入字母"b",则在文本框Text1中显示的内容是A.bbbB.BBBC.BBD.bb
把窗体的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 SubForm_KeyDown(KeyCode As Integer,Shift As Integer) PrintChr (KeyCode) End Sub Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer) PrintChr(KeyCode+2) End Sub 程序运行后,如果按“A”键,则输出结果为 ______。A.A AB.A BC.A CD.A D
将窗体的KeyPreview属性设置为True,然后编写如下过程: Private Sub Form. KeyDown(KeyCode As Integer,Shift As Integer) Print Chr(KeyCode) End Sub Private Sub Form_KeyUp(KeyCode As Integer,Shift As Integer) Print Chr(KeyCode+2) End Sub 程序运行后,如果按“A”键,则输出的结果为A.A AB.A BC.A CD.A D
在窗体上画一个名为Command1的命令按钮和一个名为Text1的文本框,并把窗体的 KeyPreview 属性设置为True,然后编写如下代码: Dim SaveAll As String Private Sub Form_ Load () Show Text1.Text = " " TextSetFocus End Sub Private Sub Command1 Click() TextText= LCase(SaveAll) End Sub Private Sub Form_ KeyPress (KeyAscii As Integer) SaveAll = SaveAll + Chr(KeyAscii) End Sub程序运行后,在键盘上输入ABCDEFG,单击命令按钮,则文本框中显示的内容为 ______。A.abodefgB.不显示任何信息C.ABCDEFGD.出错