( 15 )设在窗体 Form1 上有一个列表框 List1 ,其中有若干个项目。要求单击列表框中某一项时,把该项
显示在窗体上,正确的事件过程是
A)Prvate Sub List1_Click()
Print List1.Text
End Sub
B)Private Sub Form1_Click()
Print List1.Text
End Sub
C)Private Sub List1_Click()
Print Form1.Text
End Sub
D)Private Sub Form1_Click()
List1.Print List1.Text
End Sub
第1题:
工程中有两个窗体,名称分别为Form1、Form2,Fonn1为启动窗体,该窗体上有命令按钮 Command1。要求程序运行后单击该命令按钮时显示Form2,则按钮Click事件过程应该是 ______。
A.Private Sub Command1_click() Foma2.Show End Sub
B.Private Sub Command1_Click() Form2.Visible End Sub
C.Private Sub Command1_Click() Load Form2 End Sub
D.Private Sub Command1_click() Form.Load EndSub
第2题:
在窗体上画一个名称为Listl酌列表框,一个名称为Labell的标签,列表框中显示若干个项目。当单击列表框中的某个项目时,在标签中显示被选中项目的名称。下列能正确实现上述操作的程序是:______。
A. Private Sub Listl_Click() Labell.Caption=Listl.ListIndex End Sub
B.Private Sub Listl_Click() Labell.Name=Listl.ListIndex End Sub
C.Private Sub Listl_click() Labell.Name=Listl.Text End Sub
D.Private Sub Listl_Click() Labell.Caption=Listl.Text End Sub
第3题:
在窗体上画一个名称为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.Cavtion=List1.Text List1.RemoveItem List1.ListIndex End Sub
D.Private Sub List1_Click() Label1.Name=List1.Text List1.RemoveItem List1.ListIndex End Sub
第4题:
在窗体上绘制一个名称为List1的列表框,一个名称为Label1的标签,列表框中显示若干个项目。当单击列表框中的某个项目时,在标签中显示被选中的项目的名称。下列能正确实现上述操作的程序是 。A.Private Sub List1_Click()Labell.Caption=List.ListIndex End SubB.Private Sub List1_Click()Labell.Name=List1.ListIndex End SubC.Private Sub List1_Click()Labell.Name=List1.Text End SubD.Private Sub List1_Click()Labell.Caption=List.Text End Sub
第5题:
窗体上有一个名称为HScroll 1的滚动条,程序运行后,当单击滚动条两端的箭头时,立即在窗体上显示滚动框的位置(即刻度值)。下面能够实现上述操作的事件过程是( )。
A. Private Sub HScroll 1_Change() Print HScroll1.Value End Sub
B.Private Sub HScroll 1_Change() Print HScroll1.SmallChange End Sub
C.Private Sub HScroll1 Scroll() Print HScroll1.Value End Sub
D.Private Sub HScroll1_Scroll() Print HScroll1.SmallChange End Sub
第6题:
在窗体上绘制一个名称为List1的列表框,一个名称为Labe11的标签,列表框中显示若干个项目。当单击列表框中的某个项目时,在标签中显示被选中项目的名称。下列能正确实现上述操作的程序是
A.PriVate Sub List1_Click() Labell.CaptiOn=List.ListIndex End Sub
B.PriVate Sub List1_Click() Labell.Name=listl.ListIndex End Sub
C.Private Sub List1_Click() Labell.Name=Listl.Text End Sub
D.Private Sub List1_Click() Labell.Caption=List1.Text End Sub
第7题:
窗体上有一个列表框和一个文本框,编写如下两个事件过程: Private Sub Form_Load() List1.Addltem "北京" List1.Addltem "天津" List1.Addltem "上海" Text1.Text= "" End Sub Private Sub List1_Click() Print Text1.Text+List1.Text End Sub 程序运行后,在文本框中输入“中国”,然后单击列表框中的“北京”,则输出结果为( )。
A.中国北京
B.中国天津
C.中国上海
D.北京中国
第8题:
在窗体上画一个列表框、一个文本框及一个按钮,然后编写如下两个事件过程: Private Sub Form_Load() For i=1 To 10 List1.AddItem i * 10 Next i Text1.Text=" " End Sub Private Sub List1_Click() Print List1.Text + Text1.Text End Sub 程序运行后,在文本框中输入“123”,然后双击列表框中的第四行,则在窗体上输出的结果为
A.40123
B.163
C.123
D.30123
第9题:
设在窗体Forml上有一个列表框Listl,其中有若干个项目。要求单击列表框中某一项时,把该项显示在窗体上,正确的事件过程是。 A.Private Sub Listl_Click B.Private Sub Forml_Click Print Listl.Text Print Listl.Text End Sub End Sub C.Private Sub Listl_Click D.Private Sub Forml_Click Print Forml.Text Listl.Print Listl.Text End Sub End Sub
第10题:
在窗体上有一名为list1的列表框和名为Command1的命令按钮,要求程序运行后;如果单击命令按钮,则把列表框中所有的列表项目写到顺序文件list.txt 中。下列能完成该操作的程序是______。
A. Private Sub Command1_Click() Open “c:\list.txt”For Input As #1 For i=0 To Listl.ListCount-1 Print #1,List1.List(i) Next i Close #1 End Sub
B.Private Sub Command1_lick() Open “c:\list.txt”For Output As #1 For i=0 To List1.ListCount Print #1,List1.List(i) Next i Close #1 End Sub
C.Private Sub Command1_Click() Open “c:\list.txt”For Output As #1 For i=0 To List1.ListCount -1 Print #1,List1. List(i) Next i C1ese #1 End Sub
D.Private Sub Command1_Click() Open “c:\list.txt”For As #1 For i=0 To List1.ListCount Print #1,List1.List(i) Next i Close #1 End Sub
第11题:
在窗体上画一个名称为List1的列表框,一个名称为Labell的标签,在列表框中显示若干项内容。当单击列表框中的某项内容时,该项内容能在标签中显示出来。下列能够正确实现上述功能的程序是
A.Private Sub List1_Click() Labell.Caption=List1.ListIndex End Sub
B.Private Sub List1_Click() Labell.Name=List1.ListIndex End Sub
C.PrivateSubListl click() Labell.Name=List1.Text End Sub
D.Private Sub List1_Click() Labell.Caption=List1.Text End Sub
第12题:
在窗体上画一个List1的列表框,一个名称为Label1的标签,列表框中显示若干个项目,当单击列表框中的某个项目时,在标签中显示被选中的项目的名称,下列能正确实现上述操作的程序是( )。
A) Private Sub List1_Click()
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
第13题:
在窗体上画一个名为List1的列表框、一个名为Label1的标签。列表框中显示若干城市的名称。当单击列表框中的某个城市名时,在标签中显示选中城市的名称。下列能正确实现上述功能的程序是______。
A.Private Sub List1_Click() 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
第14题:
在窗体上画一个名称为List1的列表框,一个名称为Label1的标签,列表框中显示若干个项目。当单击列表框中的某个项目时,在标签中显示被选中项目的名称。下列能正确实现上述操作的程序是( )。
A.Private Sub List1_Click()
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
第15题:
(13)窗体上有一个列表框和一个文本框,编写下列两个事件过程: Private Sub Form_Load() List1.AddItem"北京" List1.AddItem"天津" List1.AddItem"上海" Text1.Text="" End Sub Private Sub List1_Click() Print Text1.Text+List1.text End Sub 程序运行后,在文本框中输入“中国”,然后单击列表框中的“北京”,则输出结果是A.中国北京 B.中国天津 C.中国上海 D.北京中国
第16题:
在窗体上画一个名称为List1的列表框,一个名称为Label1的标签,列表框中显示若干个项目。当单击列表框中的某个项目时,在标签中显示被选中项目的名称。下列能正确实现上述操作的程序是
A.Private Sub List1_Click( ) Label1.Caption=List1.List1ndex End Sub
B.Private Sub List1_Click( ) Label1.Name=List1.List1ndex End Sub
C.Private Sub List1_Click( ) Label1.Name=List1.Text End Sub
D.PrivateSubList1_Click( ) Label1.Caption=List1.Text End Sub
第17题:
在窗体上画一个名称为Listl的列表框,一个名称为Label1的标签。列表框中显示若干城市的名称。当单击列表框中的某个城市名时,在标签中显示选中城市的名称。 下列能正确实现上述功能的程序是
A.Private Sub List1_Click() 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
第18题:
在窗体上画一个名称为List1的列表框,一个名称为Label1的标签。列表框中显示若干城市的名称。当单击列表框中的某个城市名时,在标签中显示选中城市的名称。下列能正确实现上述功能的程序是
A.Private Sub List1 Click() Label1.Caption=List1.List- Index End Sub
B.Private Sub List1_Click() Label1.Name=List1. ListIn- dex End Sub
C.Private Sub List1 Click() Label1.Name=List1.Text End Sub
D.Private Sub List1_Click() Label1.Caption=List1.Text End Sub
第19题:
窗体Forml上有一个名称为Commandl的命令按钮,以下对应窗体单击事件的事件过程是
A.Private Sub Forml_Click() … End Sub
B.Private Sub Form_Click() … End Sub
C.Private Sub Commandl_Click() … End Sub
D.Private Sub Command_Click() … End Sub
第20题:
在窗体上画一个名称List1的列表框,一个名称为Label1的标签。列表框中显示若干城市的名称。当单
A.Private Sub list1_Click() Label1. Caption= List1. ListIndex End Sub
B.Private Sub Listl_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题:
设在窗体中有一个名称为List1的列表框,其中有若干个项目(如图)。要求选中某一项后单击Command1按钮,就删除选中的项,则正确的事件过程是( )。
A.Private Sub Command1 Click( ) List1,Clear End Sub
B.Private Sub Command1 Click( ) List1.Clear List1.ListIndex End Sub
C.Private Sub Command1 Click( ) List1 Removeltem List1.ListIndex End Sub
D.Private Sub Command1 Click( ) List1.Removeltem End Sub
第22题:
已知两个窗体Form1、Form2,下列事件过程中,______可以实现单击窗体Form1的命令按钮时,显示窗体Form2,而窗体Form1消失。
A.Private Sub Command1_ Click() LoadForm2 Form1. Hide End Sub
B.Private Sub Command1_ Click() Show Form2 Form1. Hide EndSub
C.Private Sub Command1_ click() Show Form2 Form1. Hide End Sub
D.Private Sub Command1_ click()
第23题:
窗体上有一个命令按钮Command1和一个列表框List1,其中List1有0、1、2、3、4的内容,有下列程序: Private Sub Command1_Click() Dim i,s For i=0 To List1.ListCount s=s+List1.List(i) Next i Print s End Sub 程序运行后,单击命令按钮,则窗体上显示的是
A.0
B.10
C.01234
D.程序出错