单项选择题

窗体上有一个命令按钮,命令按钮的单击事件过程如下。运行程序后,单击命令按钮,输出结果是( )。
Private Sub Command1_Click()
Dim a
a=Array(1,2,3,4,5)
For k=1 To 4
s=s+a(k)
Next k
Print s
End Sub

A.10
B.14
C.15
D.120
<上一题 目录 下一题>
热门 试题

单项选择题
为了使一个窗体从屏幕上消失但仍在内存中,所使用的方法或语句为( )。
A.Show
B.Hide
C.Load
D.UnLoad
单项选择题
设在工程中定义了如下类型: Type stutype ino As Integer stmame As String*20 strsex As String*1 smark As Single End Type 在窗体上正确使用这个类型的是下列哪个操作( )。
A.Sub Command1_click()
Dimstudent As Stutype
With student
.ino=12
.strname=smith
.strsex=男
.smark=89
End With
End Sub
B.Sub Command1_Click()
Dim student As Stutype
With student
.ino=12
.strname="smith"
.strsex="男"
.smark=89
End With
End Sub
C.Sub Command1_Click()
Dim student As Stutype
With Stutype
.ino=12
.strname="smith"
.strsex="男"
.smark=89
End With
End Sub
D.Sub Command1_click()
Dim student As Stutype
With student
.ino=12
.strname="smith"
.strsex="男"
.smark=89
End student
End Sub
相关试题
  • 下列程序弹出对话框中按钮的个数为____...
  • 组合框有3种不同的类型,这3种类型是下拉...
  • 在程序运行时,可以通过______方法来...
  • 下列程序的功能是:将字符串“abcde”逆序...
  • 设A=2,B=-4,则表达式3*A>5 Or...