单项选择题
在窗体上画一个名称为Command1的命令按钮,然后编写如下程序 _______。 Dim k As Integer Private Sub Form_Load() k=5 End Sub Private Sub Command Click() Static b As Integer b = b + k k=k+1 Print k,b End Sub 程序运行时,两次单击命令按钮Command1后,在窗体上显示的第二行是 _______。
A.7 11
B.5 11
C.76
D.2 1
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
当Command1_Click事件发生时,窗体上显示的内容是 ______。 Private Sub Command1_Click() Dim a As Integer,b As Integer,c As Integer If a = 0 Then x = x-1 Else If b <> 0 Then x = 7 Else x=x+8 End If If c <> 0 Then x = x-3 Else x = 4 End If Print x End Sub
A.7
B.8
C.4
D.3
点击查看答案&解析
单项选择题
在窗体上画一个按钮,然后编写如下事件代码。单击按钮,输出为 ______。 Private Function fun3(x As Integer) Static t As Integer t = t + 3 t = t + x fun3 = t End Function Private Sub Commandl Click() Dim a As Integer, b As Integer, c As Integer a = 2 : b = 1 c = fun3 (a) c = fun3 (b) Print c End Sub
A.6
B.8
C.9
D.12
点击查看答案&解析
相关试题
如下图所示的四个Check Box中,可以选择的...
以下所列的过程中,正确的是 ______。
下列不能作为Visual Basic变量名的是 _...
由如下程序: Type Student Num As In...
Visual Bask中工程文件的扩展名是 ___...