Private Sub Command1_Click()
C.ommondialog1.defauhext=”doc”
C.ommondialog1.filcname=”vb.txt”
C.ommondialog1.filter=”Alt(*.*)”|*.*|word|*.doc|”
C.ommondialog1.filerindex=1
C.ommondialog1.showsave
E.nd Sub
运行上述程序,如下叙述中正确的是
A.)打开的对话框中文件“保存类型”框中显示“All(*.*)”
B.)实现保存文件的操作,文件名是VB.Txt
C.)defauext属性五filename属性所指明的文件类型不一致,程序出错
D.)对话框的filter属性没有指出txt类型,程序运行出错
[单选题]在窗体上有—个名为CommonDialog1的通用对话框和一个名称为Command1的命令按钮,以及其他—些控件。要求在程序运行时,单击Command1按钮,则显示打开文件对话框,并在选择或输入了—个文件名后,就可以打开该文件。以下是Command1_Click事件过程的两种算法 算法1: Private Sub Command1_Click() CommonDialog1.ShowOpen Open CommonDialog1.FileName For Input As #1 End Sub
[单选题]在窗体上画一个名称为CommonDialog1的通用对话框,一个名称为Command1的命令按钮。要求单击命令按钮时,打开一个保存文件的通用对话框。该窗口的标题为“Save”,缺省文件名为“SaveFile”;在“文件类型”栏中显示*.txt。则能够满足上述要求的程序是( )A.Private Sub Command_Cilck() CommonDialOR1.P11eName="SaveFile" CommonDialOg1.Filter="AllFiles|*.*|(*.txt)|(*
[单选题]在窗体上画一个名称为CommonDialog1的通用对话框,一个名称为Command1的命令按钮。然后编写如下事件过程: Private Sub Command1_Click( ) CommonDialogl.FileName=“” CommonDialogl,Filter=“All File|*.*|(*.DoC|*.Doc|(*.Txt)|*.Txt” CommonDialogl.Filterlndex=2 CommonDialogl.DialogTitle=“VBTest” CommonD
[单选题]在窗体上画一个名称为CommonDialog1的通用对话框,一个名称为Command1的命令按钮,要求单击命令按钮时,打开一个保存文件的对话框,该窗口的标题为“Save”,缺省文件名称为“SaveFile”,在“文件类型”栏中显示*txt,则能够满足上述要求的程序是A.Private Sub Command1_Click ( ) CommonDialog1.FileName="SaveFile" CommonDialog1.Filter="AllFiles|*.*|(*.txt)|*.tx
[单选题]在窗体上有1个名称为CommonDialog1的通用对话框和1个名称为Command1的命令按钮,以及其他一些控件。要求在程序运行时,单击Command1按钮,则显示打开文件对话框,并在选择或输入了1个文件名后,就可以打开该文件。以下是Command1_Click事件过程的两种算法算法1:Private Sub Command1_Click()C.ommonDialog1.ShowOpenOpen CommonDialog1.FileName For Input As#1E.nd Sub算法2:
[单选题]在窗体上画一个通用对话框,其名称为CommonDialog1,然后画一个名称为Command1的命令按钮,并编写如下事件过程:Private Sub Command1_ Click()C.ommonDialogFlags = cd10FNHideReadOnlyC.ommonDialogFilter= "All Files (*.*) |*.* |Text Files" &"(*.txt |*.txt|Batch Files (*.bat)|*.bat)"C.ommonDialo
[单选题]( 29 )在窗体上有 1 个名称为 CommonDialog1 的通用对话框和 1 个名称为 Command1 的命令按钮,以及其他一些控件。要求在程序运行时,单击 Command1 按钮,则显示打开文件对话框,并在选择或输入了 1 个文件名后,就可以打开该文件。以下是 Command1_Click 事件过程的两种算法算法 1 :Private Sub Command1_Click ()C.ommonDialog1.ShowOpenOpen CommonDialog1.FileName For
[单选题]( 31 )在窗体上画一个通用对话框,其名称为 CommonDialog1 ,然后画一个命令按钮,并编写如下事件过程:Private Sub Command1_Click()C.ommonDialog1.Filter = "All Files (*.*)|*.*|Text Files" & _"(*.txt)|*.txt| Executable Files(*.exe)|*.exe"C.ommonDialog1.FilterIndex = 3C.ommonDialog1.Show
[单选题]在窗体上画一个通用对话框,其名称为 CommonDialog1 ,然后画一个命令按钮,并编写如下事件过程:Private Sub Command1_Click()C.ommonDialog1.Filter="All Files(*.*)|*.*Text Files"&_"(*.txt)|*.txt| Executable Files(*.exe)|*.exe"C.ommonDialog1.Filterindex=3C.ommonDialog1.Show OpenMsgBox Co
[单选题]在窗体中添加一个通用对话框,其名称为CommonDialog1,然后添加一个命令按钮。要求单击命令按钮时,打开一个保存文件的通用对话框。该窗口的标题为“打开”,在文件类型框中显示的是Text Files(*.txt)。则能够满足上述要求的程序是A.Private Sub Command1_Click() CommonDialog1. Flags=cdloFNHideReadonly CommonDialogl. Filter="AllFiles(*.*)|*.*|TextFiles"&