奥鹏易百

 找回密码
 立即注册

扫一扫,访问微社区

QQ登录

只需一步,快速开始

帮助中心知识拓展客服QQ 515224986
查看: 460|回复: 0

东北大学19春学期《可视化程序设计Ⅰ》在线作业3(含答案)

[复制链接]

1万

主题

1

回帖

2万

积分

论坛元老

积分
29370
发表于 2019-3-18 09:30:24 | 显示全部楼层 |阅读模式
扫码加微信
19春学期《可视化程序设计Ⅰ》在线作业3

奥鹏作业答案
奥鹏东北大学作业

一、单选题:
1.[单选题]在窗体上画一个名称为CommonDialog1的通用对话框,一个名称为Command1的命令按钮。要求单击命令按钮时,打开一个保存文件的通用对话框。该窗口的标题为“Save”,缺省文件名为“Savefile”,在“文件类型”栏中显示*.txt。则能够满足上述要求的程序是
    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"
    正确答案:——A——
2.[单选题]确定一个控件在窗体上的位置的属性是
    A.Width和Height
    B.Width或Height
    C.Top和Left
    D.Top或Left
    正确答案:——C——
3.[单选题]在窗体上面一个命令按钮(其Name属性为Commandl),然后编写如下代码:Option Base 1Private Sub Commandl_Click( )Dim a(4,4)For i =1 To 4For j =1 To 4a(i,j) = (i-1)*3+jNext jNext iFor i =3 To 4For j =3 To 4Print a(j,i);Next jPrintNext iEnd Sub程序运行后,单击命令按钮,其输出结果为
    A.6 9 7 10
    B.7 10 8 11
    C.8 11 9 12
    D.9 12 10 13
    正确答案:——D——
4.[单选题]在窗体上画一个文本框、一个标签和一个命令按钮,其名称分别为Text1、Label1和Command1,然后编写如下两个事件过程:Private Sub Command1_Click()    strText = InputBox("请输入")    Text1.Text = strTextEnd Sub
Private Sub Text1_Change()    Label1.Caption = Right(Trim(Text1.Text), 3)End Sub程序运行后,单击命令按钮,如果在输入对话框中
    A.空
    B.abcdef
    C.abc
    D.def
    正确答案:————
5.[单选题]在窗体上面画一个命令按钮,然后编写如下事件过程:Option Base 1Private Sub Commandl_Click()Dim aa = Array(1,2,3,4)j = 1For i = 4 To Step -1s = s + a(i)*jj =j*10Next iPrint sEnd Sub运行上面的程序,单击命令按钮,其输出结果是
    A.4321
    B.12
    C.34
    D.1234
    正确答案:————
6.[单选题]要从磁盘上读入一个文件名为“c:\filel.txt”的顺序文件,下面程序段正确的是()
    A."F=""c:\filel.txt""Open ""F"" For Input As # 2"    易百教育

    B."Open ""c:\filel.txt"" For Output As # 2"
    C.Open c:\filel.txt For Input As # 1
    D.Open c:\filel.txt For Input As # 1
    正确答案:————
7.[单选题]在用通用对话框控件建立“打开”或“保存”文件对话框时,如果需要指定文件列表框所列出的文件类型是文本文件(即.txt文件),则正确的描述格式是
    A.“text (.txt)|(*.txt)”
    B.“文本文件( .txt) | (.txt)”
    C.“text(.txt)||(*.txt)”
    D.“text(.txt)(*.txt)”
    正确答案:————
8.[单选题]列表框控件中的列表内容是通过( )属性设置的
    A.Name
    B.Caption
    C.List
    D.Text
    正确答案:————
9.[单选题]为了在按下回车键时执行某个命令按钮的事件过程,需要把该命令按钮的一个属性设置为True,这个属性是
    A.Value
    B.Default
    C.Cancel
    D.Enabled
    正确答案:————
10.[单选题]在窗体中添加一个通用对话框,其名称为CommonDialog1,然后添加一个命令按钮。要求单击命令按钮时,打开一个打开文件的通用对话框。该窗口的标题为“打开”,在文件类型框中显示的是TextFiles(*.txt)。则能够满足上述要求的程序是( )
    A."Private Sub Command1_Click()CommonDialog1.Flags = cdlOFNHideReadOnlyCommonDialog1.Filter = ""allfiles(*.*)|*.*|textfiles"" & ""(*.txt)|*.txt|Batchfiles(*.bat)|*.bat""CommonDialog1.FilterIndex = 1CommonDialog1.ShowOpenMsgBox CommonDialog1.FileNameEnd Sub"
    B."Private Sub Command1_Click()CommonDialog1.Flags = cdlOFNHideReadOnlyCommonDialog1.Filter = ""allfiles(*.*)|*.*|textfiles"" & ""(*.txt)|*.txt|Batchfiles(*.bat)|*.bat""CommonDialog1.FilterIndex = 2CommonDialog1.ShowOpenMsgBox CommonDialog1.FileNameEnd Sub"
    C."Private Sub Command1_Click()CommonDialog1.Flags = cdlOFNHideReadOnlyCommonDialog1.Filter = ""allfiles(*.*)|*.*|textfiles"" & ""(*.txt)|*.txt|Batchfiles(*.bat)|*.bat""CommonDialog1.FilterIndex =1CommonDialog1.ShowSaveMsgBox CommonDialog1.FileNameEnd Sub"
    D."Private Sub Command1_Click()CommonDialog1.Flags = cdlOFNHideReadOnlyCommonDialog1.Filter = ""allfiles(*.*)|*.*|textfiles"" & ""(*.txt)|*.txt|Batchfiles(*.bat)|*.bat""CommonDialog1.FilterIndex = 2CommonDialog1.ShowSaveMsgBox CommonDialog1.FileNameEnd Sub"
    正确答案:————
11.[单选题]假定窗体上有一个文本框,名为Txt1,为了使该文本框的内容能够换行,并且具有水平的垂直滚动条,正确的属性设置为( )
    A.Txt1.MultiLine = True : Txt1.ScrollBars = 0
    B.Txt1.MultiLine = True : Txt1.ScrollBars = 3
    C.Txt1.MultiLine = False: Txt1.ScrollBars = 0
    D.Txt1.MultiLine = False Txt1.ScrollBars = 3
    正确答案:————
12.[单选题]删除ListBox对象list1最后一个列表项的可行语句
    A.list1.removeitem list1.listcount
    B.list1.removeitem list1.listcount -1
    C.list1.deleteitem list1.listcount -1
    D.list1.deleteitem list1.listcount
    正确答案:————
13.[单选题]可以惟一标识控件数组中的每一个控件属性的是
    A.Name
    B.Caption
    C.Index
    D.Enabled
    正确答案:————
14.[单选题]定时器的Interval属性以( )为单位指定Timer事件之间的时间间隔
    A.分
    B.秒
    C.毫秒
    D.微秒
    正确答案:————
15.[单选题]设在窗体上有一个名称为Command1的命令按钮,并有以下事件过程Private Sub Command1_Click()Static b As Variantb=Array(1,3,5,7,9)……End Sub此过程的功能是把数组b中的5个数逆序存放(即排列为9,7,5,3,1)。为实现此功能,省略号处的程序段应该是
    A.For i=0 to 5-1\2tmp=b(i)b(i)=b(5-i-1)b(5-i-1)=tmpNext"
    B."For i=0 to 5tmp=b(i)b(i)=b(5-i-1)b(5-i-1)=tmpNext"
    C."For i=0 to 5\2tmp=b(i)b(i)=b(5-i-1)b(5-i-1)=tmpNext"
    D."For i=0 to 5\2tmp=b(i)b(i)=b(5-i-1)b(5-i-1)=tmpNext"
    正确答案:————
16.[单选题](6)在窗体上有若干控件,其中有一个名称为Text1的文本框。影响Text1的Tab顺序的属性是
    A.TabStop
    B.Enabled
    C.Visible
    D.TabIndex
    正确答案:————
17.[单选题]刚建立一个新的标准EXE工程后,不在工具箱中出现的控件是
    A.单选按钮
    B.图片框
    C.通用对话框
    D.文本框
    正确答案:————
18.[单选题]以下能够正确计算n!的程序是
    A.Private Sub Command1_Click()n=5:x=1Dox=x*ii=i+1Loop While i<nPrint xEnd Sub
    B.Private Sub Command1_Click()n=5:x=1:i=1Dox=x*ii=i+1Loop While i<nPrint xEnd Sub
    C.Private Sub Command1_Click()n=5:x=1:i=1Dox=x*ii=i+1Loop While i<=nPrint xEnd Sub
    D.Private Sub Command1_Click()n=5:x=1:i=1Dox=x*ii=i+1Loop While i>nPrint xEnd Sub
    正确答案:————
19.[单选题]关于数据控件的常用方法说法正确的
    A.Refresh方法用于从数据库中读取数据更新界面
    B.Refresh方法用于将界面中的数据更新到数据库
    C.UpdateControl方法用于从数据库中读取数据更新界面
    D.UpdateControl方法用于将界面中的数据更新到数据库
    正确答案:————
20.[单选题]以下语句的输出结果是。Print Format $(32548.5,“000,000.00”)
    A. 32548.5
    B."32,548.5"
    C."032,548.50"
    D."32,548.50"
    正确答案:————
奥鹏作业答案
奥鹏东北大学作业
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|www.openhelp100.com ( 冀ICP备19026749号-1 )

GMT+8, 2024-5-3 12:09

Powered by Discuz! X3.5

Copyright © 2001-2024 Tencent Cloud.

快速回复 返回顶部 返回列表