更多"在窗体上画一个通用对话框,其名称为CommonDialogl,然后画一"的相关试题:
[单项选择]在窗体上画一个通用对话框,其名称为CommonDialogl,然后画一个命令按钮,并编写如
下事件过程: Private Sub Commandl_Click( ) CommonDialogl,Flags=vbOFNHideReadOnly CommontDialogl.Filter="All Files(*.*)|*.*|Text Files (*.*)|*.txt|"_ & Batch Files (*.bat) |*.bat" CommonDialogl.Filterlndex=1 CommonDialogl.Showopen MsgBox CommonDialogl.FileName End Sub 程序运行后,单击命令按钮,将显示一个“打开”对话框,此时在“文件类型”框中显示的是
A. All Fries(*.*)
B. Text Files(*.*)
C. Batch Files(*.bat)
D. All Files (*.*)
[单项选择]在窗体上画一个通用对话框,其名称为CommonDialogl,然后画一个命令按钮,并编写如 下事件过程:
Private Sub Commandl_Click( )
CommonDialogl,Flags=vbOFNHideReadOnly
CommontDialogl.Filter="All Files(*.*)|*.*|Text Files (*.*)|*.txt|"_
& Batch Files (*.bat) |*.bat"
CommonDialogl.Filterlndex=1
CommonDialogl.Showopen
MsgBox CommonDialogl.FileName
End Sub
程序运行后,单击命令按钮,将显示一个“打开”对话框,此时在“文件类型”框中显示的是( )。
A. All Fries(*.*)
B. Text Files(*.*)
C. Batch Files(*.bat)
D. All Files (*.*)
[单项选择]在窗体上画一个通用对话框,其名称为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(*. *)
[单项选择]在窗体上画一个名称为CommonDialogl的通用对话框,一个名称为Commandl的命令按钮。然后编写如下事件过程: Private Commandl_Click( ) CommonDialogl.FileName="" CommonDialogl.Filter="Allfile|*.*|(*.Doc)|*.Doc|(*.Txt)|*.Txt" CommonDialogl.Filterlndex=2 CommonDialogl.DialogTifle="VBTest" CommonDialogl.Action=1 EndSub 对于这个程序,以下叙述中错误的是( )。
A. 该对话框被设置为“打开”对话框
B. 在该对话框中指定的默认文件名为空
C. 该对话框的标题为VBTest
D. 在该对话框中指定的默认文件类型为文本文件(*.Tx
[单项选择]在窗体上画一个名称为CommonDialogl的通用对话框,一个名称为Command1的命令按钮。然后编写如下事件过程:
Prirate Sub Command1_Click( )
CommonDialogl. FileName=""
CommonDialogl. Filter="All file|*. *|(*. Doc)|*. Doc|(*. Txt)|*. Txt"
CommonDialogl. Filterlndex=2
CommonDialogl. DialogTitle="VBTest"
CommonDialogl. Action=1
End Sub
对于这个程序,以下叙述中错误的是______。
A. 该对话框被设置为“打开”对话框
B. 在该对话框中指定的默认文件名为空
C. 该对话框的标题为VBTest
D. 在该对话框中指定的默认文件类型为文本文件(*. Txt)
[单项选择]在窗体上画一个通用对话框,其名称为CommonDialogl,然后画一个命令按钮,并编写如下事件过程: Private Sub Commandl_click( ) CommonDialogl.Friter="AllFiles(*.*)|*.*|Text Files"&_ "(*.txt)|*.txt|Executable Files(*.exe)|*.exe" CommonDialog1.FilterIndex=3 CommonDialog1.Show Open MsgBOX CommonDialog1.FileName End Sub 程序运行后,单击命令按钮,将显示一个“打开”对话框,此时在“文件类型”框中显示的是( )。
A. AllFries(*.*)
B. TextFiles(*.tx
C. Executable Fries(*.ex
D. 不确定