在窗体上画一个名称为CommonDialog1的通用对话框,一个名称为Command1的命令按钮。要求单击命令按钮时,打开一个保存文件的通用对话框。该窗口的标题为“Save”,缺省文件名为“SaveFile”;在“文件类型”栏中显示*.txt。则能够满足上述要求的程序是( )
A.Private Sub Command_Cilck() CommonDialOR1.P11eName="SaveFile" CommonDialOg1.Filter="AllFiles|*.*|(*.tx|(*.do|*.doc" CommonDialOg1.P11terlndex=2 CommonDialOg1.DialogTitle="Save" CommonDialOg1.Action=2 End Sub
B.Private Sub Commandl_Click() CommonDial021.FileName:"SaveFile" CommonDialog1.Pnter二”AllFlleS卜刮(*.tx陡txtHdOc卜doc” CommonDialog1.FilterIndex=1 CommonDialog1.DialogTitle="Save" CommonDialog1.Action=2 End Sub
C.Private Sub Commandl_Cilck() CommonDialog1.FileName="Save" CommonDialog1.Filter="AllFileS|*.*|(*.tx|*.txt|(*.do|*.doc" CommonDialog1.Filterlndex=2 C0mmonDialoZ1.DialogTitle="SaveFlle" CommonDialog1.Action=2 End Sub
D.Private Sub Commandl_Click() CommonOialoR1.FlleName="SaveFile" CommonDialog1.Filter="AllFiles|*.*|(*.tx|*.txt|(*.do|*.doc" CommonDialog1.Filterlndex=1 CommonDialog1.DialogTitle="Save" CommonDialog1.Action=1 End Sub