分页:
上一页 1 2 3 [4] 5 6 7 8 9 10 下一页
Label1.Caption = List1.ListIndex
End Sub
B) Private Sub List1_Click()
Label1.Name = List1.ListIndex
End Sub
C) Private Sub List1_Click()
Label1.Name = List1.Text
End Sub
D) Private Sub List1_Click()
Label1.Caption = List1.Text
End Sub
(21)在窗体上画一个命令按钮,名称为Command1,然后编写如下事件过程:
Private Sub Command1_Click()
Dim i As Integer, x As Integer
For i = 1 To 6
If i = 1 Then x = i
If i <= 4 Then
x = x + 1
Else
x = x + 2
End If
Next i
Print x
End Sub
程序运行后,单击命令按钮,其输出结果为
A)9
B)6
C)12
D)15
(22)在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程:
Private Sub Command1_Click()
c = "ABCD"
For n = 1 To 4
Print _________
Next
End Sub
程序运行后,单击命令按钮,要求在窗体上显示如下内容:
D
CD
BCD
ABCD
则在________处应填入的内容为
A)Left(c,n)
B)Right(c,n)
C)Mid(c,n,1)
D)Mid(c,n,n)
(23)执行以下程序段
Dim x As Integer, i As Integer
x=0
For i = 20 To 1 Step -2
x = x + i \ 5
Next I
后,x的值为
A)16
B)17
C)18
D)19
(24)在Visual Basic工程中,可以作为启动对象的程序是
A)任何窗体或标准模块
B)任何窗体或过程
分页:
上一页 1 2 3 [4] 5 6 7 8 9 10 下一页