单项选择题
设有如右图所示的窗体和下列程序: Private Sub Command1_Click() Text1.Text="Visual Basic" End Sub Private Sub Text1_LostFocus() If Text1.Text<>"BASIC" Then Text1.Text=" " Text1.SetFocus End If End Sub 程序运行时,在Text1文本框中输入“Basic”(如图所示),然后单击Command1按钮,则产生的结果是( )。
A.文本框中无内容,焦点在文本框中
B.文本框中为"Basic",焦点在文本框中
C.文本框中为"Basic",焦点在按钮上
D.文本框中为"Visual Basic",焦点在按钮上
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
编写如下两个事件过程: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在一般情况下(即不按住Shift键和锁定大写键时)运行程序,如果按 A 键,则程序输出的结果是( )。
A.Panel
B.Frame
C.Applet
D.Dialog
点击查看答案&解析
单项选择题
有如下程序段:Private Sub Command1_Click( )Dim a As Integera=2For i=1 To 3Print G(a)Next iEnd SubFunction G(a As Integer)b=0Static cb=b + 1c=c + 1G=a + b + cEnd Function运行上面的程序后,单击命令按钮,输出结果为( )。
A. 1 2 3
B. 2 3 4
C. 4 5 6
D. 1 4 6
点击查看答案&解析
相关试题
在窗体上画一个名称为Text1的文本框,一个...