找考题网-背景图
未分类题

在窗体上画一个通用对话框,其名称为CommonDialogl,然后画一个命令按钮,并编写如下事件过程: Private Sub Command1_Click() CommonDialogl.Flags=cdlOFNHideReadOnly commonDialogl.Filter='All Files(*.*)|*.*| Text Files'&_ '(*.txt)|*.txt|Batch Files(*.bat)|*.bat' CommonDialogl.Filterlndex=1 CommonDialogl.ShowOpen MsgBox CommonDialogl.FileName End Sub 程序运行后,单击命令按钮,将显示一个“打开”对话框,此时在“文件类型”框中显示的是 ______。
A.AllFiles(*.*)
B.TextFiles(*.txt)
C.BatchFiles(*.bat)
D.不确定

A.Flags=cdlOFNHideReadOnly
B.Filter='All
C.*)|*.*|
D.txt)|*.txt|Batch
E.bat)|*.bat'
F.Filterlndex=1
G.ShowOpen
H.FileName
I.AllFiles(*.*)
B.TextFiles(*.txt)
C.BatchFiles(*.bat)

【参考答案】

A
解析:从程序可见FilterIndex属性已经设为1,所以缺省过滤器为*.*。
热门试题