1 C)True D)False
(14)设有如下的用户定义类型:
Type Student
number As String
name As String
age As Integer
End Type
则以下正确引用该类型成员的代码是
A)Student.name = "李明" B)Dim s As Student
s.name = "李明"
C)Dim s As Type Student D)Dim s As Type
s.name = "李明" s.name = "李明"
(15)设a = 5,b = 6,c = 7,d = 8,执行下列语句后,x的值为
x = IIf((a > b) And (c > d), 10, 20)
A)10 B)20 C)True D)False
(16)执行以下程序段后,变量c$的值为
a$ = "Visual Basic Programming"
b$ = "Quick"
c$ = b$ & UCase(Mid$(a$, 7, 6)) & Right$(a$, 12)
A)Visual BASIC Programming B)Quick Basic Programming
C)QUICK Basic Programming D)Quick BASIC Programming
(17)在窗体上画一个文本框(其名称为Text1)和一个标签(其名称为Label1),程序运行后,如果在文本框中输入指定的信息,则立即在标签中显示相同的内容。以下可以实现上述操作的事件过程是
A)Private Sub Text1_Click() B)Private Sub Text1_Change()
Label1.Caption = Text1.Text Label1.Caption = Text1.Text
End Sub End Sub
C)Private Sub Label1_Change() D)Private Sub Label1_Click()
Label1.Caption = Text1.Text Label1.Caption = Text1.Text
18)在窗体上画一个命令按钮和一个标签,其名称分别为Command1和Label1,然后编写如下事件过程:
Private Sub Command1_Click()
Counter = 0
For i = 1 To 4
For j = 6 To 1 Step -2
Counter = Counter + 1
Next j
Next i
Label1.Caption = Str(Counter)
End Sub
程序运行后,单击命令按钮,标签中显示的内容是
A) 11 B)12 C) 16 D)20
(19)在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮,然后编写如下事件过程:
Private Sub Command1_Click()
Dim i As Integer, n As Integer
For i = 0 To 50
i = i + 3
n = n + 1
If i > 10 Then Exit For |