在窗体上画一个名为CommonDialog1的通用对话框,一个名称为Command1的命令按钮。要求单击命令按钮时,打开一个保存文件的通用对话框窗口。该窗口的标题为“Save”,默认文件名为“SaveFile",在“文件类型”栏中显示“*.txt”。能够满

admin2009-07-23  59

问题 在窗体上画一个名为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

答案A

解析
转载请注明原文地址:https://kaotiyun.com/show/xf1p777K
0

最新回复(0)