首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
设窗体上有一个标签Labell和一个计时器Timerl,Timerl的Interval属性被设置为1000,Enabled属性被设置为True。要求程序运行时每秒在标签中显示一次系统当前时间。以下可以实现上述要求的事件过程是( )。
设窗体上有一个标签Labell和一个计时器Timerl,Timerl的Interval属性被设置为1000,Enabled属性被设置为True。要求程序运行时每秒在标签中显示一次系统当前时间。以下可以实现上述要求的事件过程是( )。
admin
2019-06-20
39
问题
设窗体上有一个标签Labell和一个计时器Timerl,Timerl的Interval属性被设置为1000,Enabled属性被设置为True。要求程序运行时每秒在标签中显示一次系统当前时间。以下可以实现上述要求的事件过程是( )。
选项
A、Privme Sub Timerl_Timer()
Labell.Caption=True
End Sub
B、Private Sub Timer1_Timer()
Labell.Caption=Time$
End Sub
C、Private Sub Timerl_Timer()
Labell.Interval=1
End Sub
D、Privme Sub Timer1_Timer()
For k=1 To Timer1.Interval
Labell.Caption=Timer
Next k
End Sub
答案
B
解析
Timerl的Interval属性值是1000,Enabled属性为True,说明定时器开始工作,每隔1000毫秒(即1秒)触发一次Timer事件,从而执行一次Timer事件过程。要想每秒在标签中显示一次系统时间,则在Timer事件过程中把系统时间赋给标签的Caption属性就能实现。故选B。
转载请注明原文地址:https://jikaoti.com/ti/owN0FFFM
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
在窗体上画一个名称为Command1的命令按钮,并编写如下程序:OptionBase1PrivateSubCommand1_Click()Dima(4,4)Fori=1To4Forj=1To4a(i,j)=(i-1)*3+j
计算下面分段函数的正确语句是
窗体上有一个名称为Command1的命令按钮,编写如下事件过程:PrivateSubCommand1_Click()i=0DoWhilei<6Forj=1Toin=n+1Nexti=i+1LoopPrintnEndSu
设窗体上有一个Text1文本框和一个HScroll1水平滚动条,并有下面的事件过程:PrivateSubHScroll1_Change()Text1=HScroll1EndSub在程序运行时,当把滚动框移动到最左边时,文本框中显示的是100;
命令按钮、单选按钮、复选框都可以通过Picture属性在控件上显示图片,但需事先设置某一属性,该属性为
以下关于窗体的叙述中错误的是
窗体上有一个名称为Command1的命令按钮。要求编写程序,把文件f1.txt的内容写到文件f2.txt中,然后将f1.txt删除。命令按钮的单击事件过程如下:PrivateSubCommand1_Click()Open"c:\f1.txt"For
(1)有一个名为samp1.accdb的数据库。试修改职工表“employee”的结构,在“职工号”字段后增加“姓名”字段,其数据类型为文本型,长度为6,并对应职工号添加其姓名,见表2.6。(2)判断并设置表“employee”的主键,刚时将上
在考生文件夹下有一个工程文件sit5.vbp,窗口有2个名称分别为Command1和Command2、标题分别为“读数据”和“排序”的命令按钮,有2个标题分别为“数组A”和“数组B”的标签。请将窗体标题设置为“完全平方数排序”;再画2个名称分别为Text1
一棵二叉树共有25个结点,其中5个是叶子结点,则度为1的结点数为
随机试题
中共十一届三中全会是新中国成立以来党的历史上具有深远意义的伟大转折。
《神女峰》写了剪不断的乡愁和对祖国的爱与思念。()
患者,足部被利器所伤,医嘱注射破伤风抗毒素,但皮试结果为阳性,此时应采取的措施是
依照公司法的规定,股份有限公司以超过股票票面金额的发行价格发行股票所得的溢价款,应当列为公司财产的哪一部分?()。
施工企业与材料供应商订立的水泥供应合同中,约定违约金是2.0万元,但供应商的违约行为导致不能全部或部分交货给施工企业造成的损失是2.2万元,施工企业应要求供应商支付()万元。
基金托管人按()的指令向基金持有人支付基金收益和赎回款项。
“四书”是封建社会科举取士的初级标准书,它所指的是下列哪四本书?()
操作定义的独特性越大,研究的外部效度就越()
设有以下循环结构Do循环体LoopWhile<条件>则以下叙述中错误的是______。
打开名为"学生信息"的窗体时,首先发生的事件是
最新回复
(
0
)