在窗体上添加一个命令按钮Command1和两个文本框Text1和Text2,然后编写如下事件过程:Private Sub Command1_Click()n = Text1.TextSelect Case nCase 1 To 20x = 10Case 2, 4, 6x = 20Case Is < 10x = 30Case 10x = 40End SelectText2.Text = xEnd Sub程序运行后,如果在文本框Text1中输入10,然后单击命令按钮,则在Text2中显示的内容是()。
查看答案
下列没有Caption属性的控件是()。
A. 框架
B. 单选按钮
C. 文本框
D. 复选框
在窗体中添加一个命令按钮Command1,并编写如下程序:Private Sub Command1_Click()x = InputBox(x)If x ^ 2 = 9 Then y = xIf x ^ 2 < 9 Then y = 1 / xIf x ^ 2 > 9 Then y = x ^ 2 + 1Print yEnd Sub程序运行时,单击命令按钮,在InputBox中输入3,然后单击“确定”按钮,程序的运行结果为()。
A. 3
B. 0.33
C. 17
D. 0.25
当Visual Basic执行下面语句后,a的值为()。a = 1If a > 0 Then a = a + 1If a > 1 Then a = 0
A. 0
B. 1
C. 2
D. 3
下列程序段的运行结果为()。Dim xx = Int(Rnd) + 5Select Case xCase 5Print "优秀"Case 4Print "良好"Case 3Print "及格"Case ElsePrint "不及格"End Select
A. 不及格
B. 良好
C. 及格
D. 优秀