题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-06-27 23:12:54

[填空题]在窗 体上画 1 个命令按钮 和 1 个通用对话框, 其名称分别 为 Command1 和CommonDialog1,然后编写如下事件过程: Private Sub Command1_Click( ) CommonDialog1. _________ = "打开文件"" CommonDialog1.Filter = "All Files(*.*)|*.*" CommonDialog1.InitDir = "C:/" CommonDialog1.ShowOpen End Sub 该程序的功能是,程序运行后,单击命令按钮,将显示"打开"文件对话框,其标题是" 打开文件",在"文件类型"栏内显示"All Files(*.*)",并显示C盘根目录下的所有文件, 请填空。

更多"在窗 体上画 1 个命令按钮 和 1 个通用对话框, 其名称分"的相关试题:

[填空题]在窗 体上画 1 个命令按钮 和 1 个通用对话框, 其名称分别 为 Command1 和CommonDialog1,然后编写如下事件过程: Private Sub Command1_Click( ) CommonDialog1. _________ = "打开文件"" CommonDialog1.Filter = "All Files(*.*)|*.*" CommonDialog1.InitDir = "C:/" CommonDialog1.ShowOpen End Sub 该程序的功能是,程序运行后,单击命令按钮,将显示"打开"文件对话框,其标题是" 打开文件",在"文件类型"栏内显示"All Files(*.*)",并显示C盘根目录下的所有文件, 请填空。
[填空题]在窗体上画一个命令按钮和一个通用对话框,其名称分别为Command1和CommonDialog1,然后编写如下事件过程:
Private Sub Command1_Click( )
CommonDialog1.______="打开文件"
CommonDialog1.Filter="All Files(*.*)|*.*"
CommonDialog1.InitDir="C:/"
CommonDialog1.ShowOpen
End Sub
该程序的功能是:程序运行后,单击命令按钮,将显示“打开”文件对话框,其标题是“打开文件”,在“文件类型”栏内显示“All Files(*.*)”,并显示C盘根目录下的所有文件。请填空。
[单项选择]在窗体上画一个命令按钮和一个通用对话框,其名称分别为Command1和CommonDialogl,然后编写如下代码; Private SubCommand1_Click( ) CommonDialogl.Filter=" All Files |*.*|(*.exe)|*.exe|(*.doc) [*.doc|(*.bmp)|*.bmp" CommonDialogl.FileName=" " CommonDialogl.Flags=vbOFNFileMustExist CommonDialogl.FilterIndex=3 CommonDialogl.DialogTitle="OpenFile(*.doc) " CommonDialogl.Action=1 If CommonDialogl.FileName=" "Then MsgBox "No file selected",37,"Checking" Else End If End Sub 程序运行后,单击命令按钮,将显示一个对话框,该对话框的标题是 ______。
A. 空字符
B. OpenFile(*.do
C. 打开文件
D. 保存文件
[填空题]在窗体上画一个通用对话框,其名称为CommonDialog1,然后画一个名称为Command1的命令按钮,并编写如下事件过程: Private Sub Command1_ Click( ) CommonDialog1. Flags = cd10FNHideReadOnly CommonDialog1. Filter= "All Files (*.*) |*.* |Text Files" & "(*.txt |*.txt|Batch Files (*.bat)|*.bat)" CommonDialog1. FilterIndex = 1 CommonDialog1.ShowOpen MsgBox CommonDialog1.FileName End Sub 程序运行后,单击命令按钮,将显示一个“打开”对话框,此时在“文件类型”框中显示的是 ______ ;如果在对话框中选择D盘temp 目录下的te1.txt 文件,然后单击“确定”按钮,则在信息框中显示的提示信息是______ 。
[单项选择]在窗体上画一个通用对话框,其名称为CommonDialog1,然后画一个名为Command1的命令按钮,并编写如下事件过程: Private Sub Command1_ Click( ) CommonDialog1. Flags= cd10FNHideReadOnly CommonDialog1. Filter= "All Files (*.*) |*.*|Text File" & _ "(*.txt) |*.txt | Batch Files (*.bat)| *.bat" CommonDialog1. FilterIndex = 2 CommonDialog1. ShowOpen MsgBox CommonDialog1. FileName End Sub程序运行后,单击命令按钮,将显示一个“打开”对话框,此时在“文件类型”框中显示的是______ 。
A. All Files (*.*)
B. Text Files(*.tx
C. Batch Files (*.ba
D. 不确定
[单项选择]在窗体上有1个名称为CommonDialog1的通用对话框和1个名称为Command1的命令按钮,以及其他一些控件。要求在程序运行时,单击Command1按钮,则显示打开文件对话框,并在选择或输入个文件名后,就可以打开该文件。以下是Command1_Click事件过程的两种算法 算法1: Private Sub Command1_Click( ) CommonDialog1.Show Open Open CommonDialog1.File Name For Input As#1 End Sub 算法2: Private Sub Command1_Click( ) CommonDialog1.Show Open If CommonDialog1.File Name<>" "Then Open CommonDialog1.File Name For Input As#1 EndIf End Sub 下面关于这两种算法的叙述中正确的是【 】
A. 显示打开文件对话框后若未选择或输入任何文件名,则算法2会出错,算法1不会
B. 显示打开文件对话框后若未选择或输入任何文件名,则算法1会出错,算法2不会
C. 两种算法的执行结果完全一样
D. 算法1允许输入的文件名中含有空格,而算法2不允许
[单项选择]在窗体上画一个名称为CommonDialog1的通用对话框,一个名称为Command1的命令按钮。然后编写如下事件过程:
Private Sub Command1_Click( )
CommonDialog1.FileName=""
CommonDialog1.Hker="All file|*.*|(*.Doc)|*.Doc|(*.Txt)|*.Txt"
CommonDialog1.Filtefindex=2
CommonDialog1.DialoSTitle="VBTest"
CommonDialog1.Action=1
End Sub
对于这个程序,以下叙述中错误的是
A. 该对话框被设置为“打开”对话框
B. 在该对话框中指定默认文件名为空
C. 该对话框的标题为VBTest
D. 在该对话框中指定的默认文件类型为文本文件(*.Txt)
[单项选择]窗体上有一个名称为CDI的通用对话框,一个名称为Command1的命令按钮。命令按钮的单击事件过程如下:
Private Sub Command1_Click( )
CD1. FileName=""
CD1. Filter="All Files|*. *|(*. Doc)|*.Doc|(*. Txt)|*.Txt"
CD1. FiherIndex=2
CD1. Action=1
End Sub
关于以上代码,叙述错误的是( )。
A. 执行以上事件过程,通用对话框被设置为“打开”文件对话框
B. 通用对话框的初始路径为当前路径
C. 通用对话框的默认文件类型为*. Txt
D. 以上代码不对文件执行读写操作
[单项选择]窗体上有一个名称为CD1的通用对话框,一个名称为Command1的命令按钮,相应的事件过程如下:
Private Sub Command1_Click( )
CD1. Filter = "All File| *. * |Text File| *. txt|PPT| *. ppt"
CD1. FiherIndex = 2
CD1. InitDir = "C: /"
CD1. FileName = "default"
CD1. ShowSave
End Sub
关于上述过程,以下叙述中正确的是( )。
A. 默认过滤器为“*. ppt”
B. 指定的初始目录为“C: /”
C. 打开的文件对话框的标题为“default”
D. 上面事件过程实现保存文件的操作
[单项选择]在窗体上画一个名称为CommonDialogl的通用对话框,一个名称为Command1的命令按钮。然后编写如下事件过程: Prirate Sub Command1_Click( ) CommonDialogl. FileName="" CommonDialogl. Filter="All file|*. *|(*. Doc)|*. Doc|(*. Txt)|*. Txt" CommonDialogl. Filterlndex=2 CommonDialogl. DialogTitle="VBTest" CommonDialogl. Action=1 End Sub 对于这个程序,以下叙述中错误的是______。
A. 该对话框被设置为“打开”对话框
B. 在该对话框中指定的默认文件名为空
C. 该对话框的标题为VBTest
D. 在该对话框中指定的默认文件类型为文本文件(*. Tx

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码