题目内容:
在窗体上面一个名称为CommonDialonl的通用对话框,一个名为 Command1的命令按钮。要求单击命令按钮时,打开一个保存文件的通用对话框。该窗口的标题为“SaVe”,缺省文件名为“saV.Fil。”,在“文件类型”栏中显示m.txt。则能够满足上述要求的程序是( )A.Private Sub Command l_Click0
CommonDialog 1.FileName=“SaveFile”
CommonDialog 1.Filter=“All Files|*.*|(*.txt)|*.txt (*.doC.|*.doc”
CommonDialog 1.Filterlndex=2
CommonDialog 1.DialogTitle=“Save”
CommonDialog 1.Action=2
B.Private Sub Command1_Click()
ColmmonDialog 1.FileName=“SaveFile”
CommonDialog 1.Filter=“All Files|*.*|(*.txt)|*.txt (*.doC.|*.doc”
CommonDialog 1.FilterIndex=1
CommonDialog 1.DialogTitle=“Save”
CommonDialog 1.Action=2
End Sub
C.Private Sub Command1_Click()
CommonDialog 1.FileName=“Save”
CommonDialog 1.Filter=“All Files|*.*|(*.txt)|*.txt (*.doC.|*.doc”
ConlmonDialog 1.Filterlndex=2
CommonDialog 1.DialogTitle=“SaveFile”
CommonDialog 1.Action=2
End Sub
D.Private Sub Command l_Click()
CoImmonDialog 1.FileName=“1SaveFile”
CommonDialog 1.Filter=“All Files|*.*|(*.txt)|*.txt (*.doC.|*.doc”
CommonDialog 1.Filterlndex=1
CommonDialog 1.DialogTitle=“Save”
CommonDialog 1.Action=1
参考答案:
答案解析: