首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
设窗体上有一个标签Labeil和一个计时器Timer1,Timer1的Interval属性被设置为1000,Enabled属性被设置为True。要求程序运行时每秒在标签中显示一次系统当前时间。以下可以实现上述要求的事件过程是( )。
设窗体上有一个标签Labeil和一个计时器Timer1,Timer1的Interval属性被设置为1000,Enabled属性被设置为True。要求程序运行时每秒在标签中显示一次系统当前时间。以下可以实现上述要求的事件过程是( )。
admin
2020-06-30
29
问题
设窗体上有一个标签Labeil和一个计时器Timer1,Timer1的Interval属性被设置为1000,Enabled属性被设置为True。要求程序运行时每秒在标签中显示一次系统当前时间。以下可以实现上述要求的事件过程是( )。
选项
A、Private Sub Timer1_Timer()
Label1.Caption=True
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
Label 1.Caption=Timer
Next k
End Sub
答案
B
解析
Timer1的Interval属性值是1000,Enabled属性为True,说明定时器开始工作,每隔1000毫秒(即1秒)触发一次Timer事件,从而执行一次Timer事件过程。要想每秒在标签中显示一次系统时间,则在Timer事件过程中把系统时间赋给标签的Caption属性就能实现。故选B。
转载请注明原文地址:https://kaotiyun.com/show/ymHp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
在软件开发中,需求分析阶段可以使用的工具是( )。
以下叙述中正确的是
用户在组合框中输入或选择的数据可以通过一个属性获得,这个属性是()。
窗体上有1个名称为Text1的文本框;1个名称为Timer1的计时器控件,其Interval属性值为5000,Enabled属性值是True。Timer1的事件过程如下:PrivateSubTimer1_Timer()Static
在考生文件夹下有一个工程文件sjt5.vbp。程序运行时,单击“装入数据”按钮,则从考生文件夹下的in5.txt文件中读入所有城市名称和距离,城市名称按顺序添加到列表框List1中,距离放到数组a中;当选中列表框中的一个城市时,它的距离就在Text1中显示
如图所示,在窗体上有一个文本框控件,名称为TextTime;一个计时器控件,名称为Timer1。要求每1s在文本框中显示一次当前的时间。PrivateSubTimer1______________TextTime.Text=TimeEndSu
用树形结构表示实体之间联系的模型是
窗体上有一个名称为VScroll1的垂直滚动条,为了设定单击滚动条两端箭头时的Value增量值,应设置的属性是
执行以下程序段a$="VisualBasicProgramming":b$="C++"c$=UCase(Left$(a$,7))&b$&RightS(aS,12)变量c$的值为
以下不具有Picture属性的对象是
随机试题
心脏骤停最常见的病因是
A.辛诺柏病毒B.汉城病毒C.汉坦病毒D.普马拉病毒E.泰国病毒引起肾综合征出血热临床症状较重的病毒是
患者女性,60岁,长期双上肢掌指关节肿、痛、压痛,血沉快。被确诊为类风湿性关节炎,医生意见是不用糖皮质激素,何故
肺循环血流量增多,而左心室、主动脉及体循环血流量减少的先心病是
特发性血小板减少性紫癜患者体内产生血小板特异性IgG的部位主要是
下列关于城市维护建设税计税依据的表述中,正确的有()。
下列关于乳中碳水化合物的描述,错误的是()
根据2010年第六次全国人口普查主要数据,全国总人口为1370536875人。同2000年第五次全国人口普查相比,增加了73899804人。普查登记的大陆31个省、自治区、直辖市和现役军人的人口共1339724852人,同2000年第五次全国人口普查相比,
他的房间布置很讲究。
Measureshavebeentakentopreventtheepidemicfromspreadingquickly.
最新回复
(
0
)