首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
设窗体上有一个标签Label1和一个计时器Timer1,Timer1的Interval属性被设置为1000,Enabled属性被设置为True。要求程序运行时每秒在标签中显示一次系统当前时间。以下可以实现上述要求的事件过程是( )。
设窗体上有一个标签Label1和一个计时器Timer1,Timer1的Interval属性被设置为1000,Enabled属性被设置为True。要求程序运行时每秒在标签中显示一次系统当前时间。以下可以实现上述要求的事件过程是( )。
admin
2015-08-13
33
问题
设窗体上有一个标签Label1和一个计时器Timer1,Timer1的Interval属性被设置为1000,Enabled属性被设置为True。要求程序运行时每秒在标签中显示一次系统当前时间。以下可以实现上述要求的事件过程是( )。
选项
A、Private Sub Timer1_Timer()
Lahel1.Caption=Tree
End Sub
B、Private Sub Timer1_Timer()
Label1.Caption=Time$
End Sub
C、Private Sub Timer1_Timer()
Label1.Interval=1
End Sub
D、Private Sub Timer1_Timer()
For k=1 To Timer1.Interval
Label1.Caption=Timer
Next k
End Sub
答案
B
解析
Timer1的Interva1属性值是1000,Enabled 属性为True,说明定时器开始工作,每隔1000毫秒(即1秒)触 发一次Timer事件,从而执行一次Timer事件过程。要想每秒 在标签中显示一次系统时间,则在Timer事件过程中把系统时 间赋给标签的Caption属性就能实现。故选B。
转载请注明原文地址:https://jikaoti.com/ti/BC60FFFM
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
下列可以把当前目录下的图形文件pic1.jpg装入图片框Picture1中的语句为
与传统的程序设计语言相比,VisualBasic最突出的特点是
将E—R图转换到关系模式时,实体与联系都可以表示成
在显示字体对话框之前必须设置【】属性,否则,将发生字体不存在的错误。
在考生文件夹下有一个工程文件sjt5.vbp,窗体上有两个标题分别是“读数据”和“统计”的命令按钮。请画两个标签,名称分别为Labell和Label2,标题分别为“出现次数最多的字母是”和“它出现的次数为”;再画两个名称分别为Textl和Text2、初始值
下列表达式有错误,正确的写法应该是【】。[(a+B)+c]/80-5÷(d+e)
设A=2,B=-2,则表达式A/2+1>B+5orB*(-2)=6的值是______。
假定建立了一个名为Command1的命令按钮数组,则下列说法中错误的是()。
下列说法中错误的是()。
两个或两个以上模块之间联系的紧密程度称为()。
随机试题
电动压力调节器开度突然变大的原因可能是()。
有"夏月之麻黄"之称的药物是
骨折近端向后倾斜移位骨折远端向后倾斜移位
慢性呼吸衰竭最常见的酸碱失衡是
对建筑物的基本要求是安全、适用、经济、美观,下列对建筑物的要求中,属于适用方面的要求是()。
由于职业判断贯穿于注册会计师审计工作的全过程,并且可能得到的审计证据有很多是说服性而非结论性的,因此,注册会计师的任何审计意见都不能绝对保证会计报表使用人确定已审计会计报表的可靠程度。 ( )
简要回答幼儿成长档案袋评价的含义及基本内容。
行政主体就是行政法律关系主体。()
某温泉旅游胜地村委会主任选举时,温泉度假村总经理姜某许诺给他投票的选民可以获赠温泉度假村门票10张,并为谋求镇政府支持送给镇长温泉度假村VIP钻石卡一张(价值10万元)。对于姜某的行为说法正确的是()
2017年11月25日,甲(2003年11月26日出生)在公共汽车上将手伸进丙的衣袋偷东西,丙发现后立即抓住甲的手。甲的同伙乙(2000年12月5日出生)见状拔出甲随身携带的匕首刺向丙胸部。丙情急之下拉过乘客陈某的胳膊挡在自己前面,乙刺中陈某胳膊,致其轻伤
最新回复
(
0
)