柠檬试题库
search
首页
计算机
公务员
驾照
关于
share
设窗体上有一个标签Label1和一个计时器Timer1,Timer1的Interval属性被设置为1000,Enabled属性被设置为True。要求程序运行时每秒在标签中显示一次系统当前时间。以下可以实现上述要求的事件过程是( )。
A.Private Sub Timer1_Timer()Label1.Caption=TrueEnd Sub
B.Private Sub Timer1_Timer()Label1.Caption=Time$End Sub
C.Private Sub Timer1_Timer()Label1.Interval=1End Sub
D.Private Sub Timer1_Timer()For k=1 To Timer1.IntervalLabel1.Caption=TimerNext kEnd Sub
热度🔥372
参考答案:B
解析:
【解析】Timer1的Interval属性值是1000,Enabled属性为True,说明定时器开始工作,每隔1000毫秒(即1秒)触发一次Timer事件,从而执行一次Timer事件过程。要想每秒在标签中显示一次系统时间,则在Timer事件过程中把系统时间赋给标签的Caption属性就能实现。故选B。
复制题目向AI提问
content_copy
content_copy
扫码免费计算机二级刷题
2025年计算机等级考试题库
推荐
子过程Plus完成对当前库中"教师表"的工龄字段都加1的操作。 Sub Plus( ) Dim cn As New ADODB.Connection Dim rs As New ADODB.Recordset Dim fd As ADODB.Field Dim strConnect As String Dim strSQL As String Set cn=CurrentProject.Connection strSQL = "Select 工龄 from 教师表" rs.Open strSQL, cn, adOpenDynamic, adLockOptimistic, adCmdText Set fd = rs.Fields("工龄") Do While Not rs.EOF 【 】 rs.Update rs.MoveNext Loop rs.Close cn.Close Set rs = Nothing Set cn = Nothing End Sub 程序空白处【 】应该填写的语句是
下列关于C语言文件的叙述中正确的是
以下fun函数的功能是将形参s所指字符串内容颠倒过来 void fun( char *s ) { int i, j, k; for( i=0, j=strlen(s) __________ ; i
下列Serv_U FTP服务器的选项中,不提供“IP访问选项”的是()
下列有关测试的说法中,错误的是
标签
二级VB程序设计
timer
sub
timer1
属性