更多"在窗体上画一个文本框,其名称为Text1,然后编写如下事件过程: P"的相关试题:
[单项选择]在窗体上画一个名称为Text1的文本框,然后编写如下事件过程: Private Sub Text1_ KeyPress (KeyAscii As Integer) Dim ch As String ch = Chr (KeyAscii) KeyAscii = Asc (UCase(ch)) Text1. Text = String(1, KeyAscii) End Sub程序运行后,使文本框拥有焦点,然后按键盘上的B键,则在文本框中显示的内容是 ______ 。
A. b
B. bb
C. BB
D. B
[单项选择]在窗体上画一个文本框(Text1),然后编写如下事件过程:
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. a
B. A
C. aaaa
D. AAAA
[单项选择]在窗体上画一个文本框,其名称为Text1,然后编写如下过程:
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
Print Chr(KeyCode)
End Sub
Private Sub Text1_KeyUp(KeyCode As Integer, Shift As integer)
Print Chr(KeyCode+2)
End Sub
程序运行后,把焦点移到文本框中,此时如果敲击“A”键,则输出结果为
A. A
B. A
C. A
D. A
[单项选择]在窗体上画一个文本框,其名称为Text1,然后编写如下事件过程:
Private Sub Text1_KeyPress(KeyAscii As Integer)
Dim sb As String
Str=Chr(KcyAscii)
KeyAscii=Asc(UCase(str))
Text1.Text=String(2,KeyAscii)
End Sub
程序运行后,如果在键盘上输入字母“b”,则在文本框Text1中显示的内容是
A. bbb
B. BBB
C. BB
D. bb
[单项选择]在窗体上画一个文本框,然后编写如下事件过程:
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. a
B. A
C. aaaaaaa
D. AAAAAAA
[单项选择]在窗体上画一个名称为Text1的文本框,并编写如下程序:
Private Sub Form Load( )
Show
Text1.Text=""
Text1.SetFocus
End Sub
Pfivate Sub Form_MouseUp(BuHon As Integer,Shift As Integer,X As Single,Y As Single)
Print“程序设计”
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer,shift As Integer)
Print"Visua1 Basic";
End Sub
程序运行后,如果按“A”键,然后单击窗体,则在窗体上显示的内容是
A. VisualBasic
B. 程序设计
C. A程序设计
D. Visual Basic程序设计