二级二级VB2003年4月全国计算机等级考试二级VB笔试试卷
题目内容

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

2024-07-09

A.Private Sub Command1_Click()CommonDialog1.FileName = "SaveFile"CommonDialog1.Filter = "All Files|*.*|(*.txt)|*.txt|(*.doc)|*.doc"CommonDialog1.FilterIndex = 2CommonDialog1.DialogTitle = "Save"CommonDialog1.Action = 2End Sub

B.Private Sub Command1_Click()CommonDialog1.FileName = "SaveFile"CommonDialog1.Filter = "All Files|*.*|(*.txt)|*.txt|(*.doc)|*.doc"CommonDialog1.FilterIndex = 1CommonDialog1.DialogTitle = "Save"CommonDialog1.Action = 2End Sub

C.Private Sub Command1_Click()CommonDialog1.FileName = "Save"CommonDialog1.Filter = "All Files|*.*|(*.txt)|*.txt|(*.doc)|*.doc"CommonDialog1.FilterIndex = 2CommonDialog1.DialogTitle = "SaveFile"CommonDialog1.Action = 2End Sub

D.Private Sub Command1_Click()CommonDialog1.FileName = "SaveFile"CommonDialog1.Filter = "All Files|*.*|(*.txt)|*.txt|(*.doc)|*.doc"CommonDialog1.FilterIndex = 1CommonDialog1.DialogTitle = "Save"CommonDialog1.Action = 1End Sub

题目答案

试卷相关题目

最新试卷
热门试卷

长理培训客户端 资讯,试题,视频一手掌握

去 App Store 免费下载 iOS 客户端