[單項選擇題] 在窗體上畫一個名為CommonDialog1的通用對話框,一個名稱為Command1的命令按鈕。要求單擊命令按鈕時,打開一個保存文件的通用對話框
[單項選擇題] 在窗體上畫一個名為CommonDialog1的通用對話框,一個名稱為Command1的命令按鈕。要求單擊命令按鈕時,打開一個保存文件的通用對話框窗口。該窗口的標題為“Save”,默認文件名為“SaveFile",在“文件類型”欄中顯示“*.txt”。能夠滿足上述要求的程序是 ______ 。
A.Private Sub Command1_ Click()CommonDialog1. FileName = "SaveFile"CommonDialog1. Filter = "All Files | *.* |*.txt *.txt| *.doc| *.doc"CommonDialog1. Filterlndex = 2CommonDialog1. 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 = 1CommonDialog1. 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 = 2CommonDialog1. 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 = 1CommonDialog1. DialogTitle = "Save".CommonDialog1. Action = 1 End Sub
正確答案:A
詞條內(nèi)容僅供參考,如果您需要解決具體問題
(尤其在法律、醫(yī)學等領域),建議您咨詢相關領域?qū)I(yè)人士。