单项选择题
在窗体上画一个名称为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
点击查看答案
<上一题
目录
下一题>
热门
试题
填空题
编写如下代码:Dim Flag As BooleanPrivate Sub Form MouseDown (Button As Integer,Shift As Integer, X As Single, Y As Single)Flag = TrueEnd SubPrivate Sub Form MouseMove (Button As Integer,Shift As Integer, X As Single, Y As Single)Flag = FalseEnd SubPrivate Sub Form_ MouseUp (Button As Integer,Shift As Integer, X As Single, Y As Single)If Flag = False ThenPrint DDDD End IfEnd Sub程序运行后,如果想在窗体上输出DDDD,则应执行的操作为______ 。
点击查看答案
填空题
对窗体编写如下两个事件过程:Private Sub Form_ KeyDown (KeyCode As Integer, Shift As Integer)Print Chr (KeyCode)End SubPrivate Sub Form_ KeyPress (KeyAscii As Integer)Print Chr (KeyAscii)End Sub程序运行后,如果直接按键盘上的a键(即不按住shift键),则在窗体上输出的字符分别为______ 和______ 。
点击查看答案
相关试题
阅读程序;Option Base 1Private Sub ...
在窗体上画两个文本框,其名称分别为Text1...
在窗体上画一个名为Command1的命令按钮和...
编写如下事件过程: Private Sub FOrm_...