单项选择题

窗体上有一个命令按钮,命令按钮的单击事件过程如下。运行程序后,单击命令按钮,输出结果是( )。
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
相关试题
  • 在一个窗体上添加一命令按钮控件,名为Comm...
  • 下列程序段的执行结果为( )。 Dim A(...
  • 在窗体上画两个文本框Text1和Text2,一个...
  • 在窗体上画一个名称为“Command1”、标题...
  • 在窗体上放置一个命令按钮Command1,并编...