在窗体上画一个名为CommonDialog1的通用对话框,一个名称为Command1的命令按钮。要求单击命令按,打开一个保存文件的通用对话框窗口。该窗口的标题为“Save”,默认文件名为“SaveFile',在“文件类型”栏中显示“*.txt”。能够满足上述要求的程序是 ______。
A.
Private Sub Command1_ Click() CommonDialog1. FileName = 'SaveFile' CommonDialog1. Filter = 'All Files | *.* |*.txt *.txt| *.doc| *.doc' CommonDialog1. Filterlndex = 2 CommonDialog1. DialogTitle = 'Save' CommonDialog1. Action = 2 End Sub
B.
Private Sub Command1_Click() CommonDialog1. FileName = 'SaveFile' CommonDialog1. Filter = 'All Files |*.* | *.txt|*.txt|*.doc|*.doc' CommonDialog1. Filterlndex = 1 CommonDialog1. DialogTitle = 'Save' CommonDialog1. Action = 2 End Sub
C.
Private Sub Command1_ Click() CommonDialog1. FileName = 'Save' CommonDialog1. Filter = 'All Files |%* |*.txt|*.txt|*.doc|*.doc' CommonDialog1. Filterlndex = 2 CommonDialog1. DialogTitle = 'Save' CommonDialog1. Action = 2 End Sub
D.
Private Sub Command1_ Click() CommonDialog1. FileName = 'SaveFile' CommonDialog1. Filter = 'All Files |*.*|*.txt|*.txt|*.doc|*.doc' CommonDialog1. Filterlndex = 1 CommonDialog1. DialogTitle = 'Save'. CommonDialog1. Action = 1 End Sub