vb常用控件__练习题(含答案).doc
文本预览下载声明
1.下列控件中没有Caption属性的是 ________。
A)框架 B)列表框 C)复选框 D)单选按钮
2.复选框的Value 属性为 1 时,表示 ________。
A)复选框未被选中 B)复选框被选中
C)复选框内有灰色的勾 D)复选框操作有误
3.用来设置斜体字的属性是 ________。
A)FontItalic B)FontBold C)FontName D)FontSize
4.将数据项“China”添加到列表框List1中成为第二项应使用 ________语句。
A)List1.AddItem “China”,1 B)List1.AddItem “ China ”, 2
C)List1.AddItem 1,“China” D)List1.AddItem 2,“ China ”
5.引用列表框List1最后一个数据项,应使用 ________语句。
A)List1.List(List1.ListCount) B)List1.List(ListCount)
C)List1.List(List1.ListCount-1) D)List1.List(ListCount-1)
6.假如列表框List1有四个数据项,那么把数据项“China”添加到列表框的最后,应使用 ________语句。
A)List1.AddItem 3,“ China ”
B)List1.AddItem “ China ”, List1.ListCount-1
C)List1.AddItem “ China ”, 3
D)List1.AddItem “China”, List1.ListCount
7.执行了下面的程序后,列表框中的数据项有________。
Private Sub Form_Click()
For i = 1 to 6
List1.AddItem i
Next i
For i = 1 to 3
List1.RemoveItem i
Next i
End Sub
A)1,5,6 B)2,4, 6 C )4,5,6 D)1,3,5
8.如果列表框List1中没有选定的项目,则执行
List1.RemoveItem List1.ListIndex 语句的结果是 ________。
A)移去第一项 B)移去最后一项
C)移去最后加入列表中的一项 D)以上都不对
9.如果列表框List1中只有一个项目被用户选定,则执行
Debug.Print List1.Selected(List1.ListIndex)语句的结果是________。
A)在Debug窗口输出被选定的项目的索引值
B)在Debug窗口输出True
C)在窗体上输出被选定的项目的索引值
D)在窗体上输出True
10.在窗体上画一个名称为List1的列表框,一个名称为Label1的标签,列表框中显示若干城市的名称。但单击列表框中的某个城市名时,该城市名从列表框中消失,并在标签中显示出来。下列能正确实现上述操作的程序是______。
A)Private Sub List1_Click()
?????? Label1.Caption=List1.ListIndex
?????? List1.RemoveItem List1.Text
???? End Sub
B)Private Sub List1_Click()
?????? Label1.Name=List1.ListIndex
?????? List1.RemoveItem List1.Text
???? End Sub
C)Private Sub List1_Click()
?????? Label1.Caption=List1.Text
?????? List1.RemoveItem List1.ListIndex
???? End Sub
D)Private Sub List1_Click()
?????? Label1.Name=List1.Text
?????? List1.RemoveItem List1.ListIndex
???? End Sub
11.下列说法中正确的是 ________。
A)通过适当的设置,可以在程序运行期间,让时钟控件显示在窗体上
B)在列表框中不能进行多项选择
C
显示全部