设窗体占有一个标签Label1和一个计时器Timer1,Timerl的Interval属性被设置为1000,Enabled属性被设置为True。要求程序运行时每秒在标签中显示一次系统当前时间。以下可以实现上述要求的事件过程是

admin2019-04-29  30

问题 设窗体占有一个标签Label1和一个计时器Timer1,Timerl的Interval属性被设置为1000,Enabled属性被设置为True。要求程序运行时每秒在标签中显示一次系统当前时间。以下可以实现上述要求的事件过程是

选项 A、Private Sub Timerl Timer(     )
B、Private Sub Timerl_Timer()
Labell.Caption=True Labell.Caption=Times
End SubEnd Sub
C、Private Sub Timerl_Timer(     )
D、Private Sub Timerl Timer()
Labell.Interval=1For k=1 To Timerl_Interval
End Sub Label 1.Caption=Timer
Next k
End Sub

答案B

解析 本题考查的考点是有关计时器的。计时器的Interval属性决定了每隔多长时间触发一次Timer事件。本题中Interval设置为1000,即每1秒触发一次Timer事件。在事件中把标签的Caption属性设置成为当前时间,用Time函数可以得到当前时间。
转载请注明原文地址:https://jikaoti.com/ti/zyN0FFFM
0

相关试题推荐
随机试题
最新回复(0)