单项选择题
在窗体上画一个列表框和一个命令按钮,其名称分别为List1和Command1,然后编写如下事件过程。
Private Sub Form_Load()
List1.AddItem "Item 1"
List1.AddItem "Item 2"
List1.AddItem "Item 3"
End Sub
Private Sub Command1_Click()
List1.List(List1.Listcount)="AAAA"
End Sub
程序运行后,单击命令按钮,其结果为
A.把字符串"AAAA"添加到列表框中,但位置不能确定
B.把字符串"AAAA"添加到列表框的最后(即"Item 3"的后面)
C.把列表框中原有的最后一项改为"AAAA"
D.把字符串"AAAA"插入到列表框的最前面(即"Item 1"的前面)
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有如下一个函数过程: Function Fun(a As Integer) Static c b=0:b=b+1:c=c+1 Fun=a+b+c End Function 在窗体上添加一个命令按钮,事件过程如下: Private Sub Command1_Click() Dim a As Integer a=2 For i=1 To 3 Print Fun(
A.;
Next
End Sub
运行该程
点击查看答案&解析
单项选择题
在窗体上画一个通用对话框,其名称为CommonDialogl,然后画一个命令按钮,并编写如 Private Sub Command1_Click() CommonDialogl. Flags = vbOFNHideReadOnly CommonDialogl. Filter = All Files(*.*)|*. * |Text Files(*.txt)|*. txt CommonDialogl. FilterIndex = 1 CommonDialogl. ShowOpen MsgBox CommonDialogl. FileName End Sub 程序运行后,单击命令按钮,将显示一个“打开”对话框,此时在“文件类型”框中显示的是
A.All Files(*.*)
B.Text Files(*.txt)
C.Batch Files(*.bat)
D.All Files(*. *)|Text Files(*.txt)
点击查看答案&解析
相关试题
有如下事件过程: Private Sub Form Ac...
下列事件过程的功能是:建立一个名为Datal...
下面程序的功能是统计字符串中“i”的个数...
下列程序的功能是:当x<50时,y =0....
下列程序的功能是:将数据1,2,..,8...