梦100高修图片:请问这道题怎么做?

来源:百度文库 编辑:高校问答 时间:2024/05/13 09:44:25
1、属性设置及程序改错
gc248.frm的功能是:设计一个窗口,日历牌每10秒显示一次,每次显示10秒;系统时间的数字式表每秒显示一次新的时间。要求:
一、设置计时器Timer1 和Timer2的属性
二、在编写的二个过程代码Timer1_Timer(),Timer2_Timer()中各有一个错误,请调试改正.
调试改正中,每个过程代码只能改一处,并不得增删语句.

原代码如下:
Private Sub Form_Load()
Label1.Caption = Trim(Str(Year(Date))) + "年" + Trim(Str(Month(Date))) + "月" + Trim(Str(Day(Date))) + "日"
Label2.Caption = Time()
End Sub

Private Sub Timer1_Timer()
If Label1.Visible = True Then
Label1.Visible = False
Else
Label1.Visible = False
End If
End Sub

Private Sub Timer2_Timer()
If Label2.Caption <> Time() Then
Label2.Caption = Timer()
End If

End Sub
其中控件包括两个timer()和两个label.

谢谢!!!!

Private Sub Form_Load()
Label1.Caption = Trim(Str(Year(Date))) + "年" + Trim(Str(Month(Date))) + "月" + Trim(Str(Day(Date))) + "日"
Label2.Caption = Time()
Timer1.Interval = 10000'设置成10000毫秒,即10秒
Timer2.Interval = 1000'设置成1000毫秒,即1秒
End Sub

Private Sub Timer1_Timer()
If Label1.Visible = True Then
Label1.Visible = False
Else
Label1.Visible = True'将Label1.Visible = False改成Label1.Visible = True
End If
End Sub

Private Sub Timer2_Timer()
If Label2.Caption <> Time() Then
Label2.Caption = Time() '将Timer()改成Time()
End If
End Sub

Private Sub Timer1_Timer()
If Label1.Visible = True Then
Label1.Visible = False
Else
Label1.Visible = False -->Label1.Visible = True
End If
End Sub

Private Sub Timer2_Timer()
If Label2.Caption <> Time() Then
Label2.Caption = Timer() -->Label2.Caption = Time()
End If
这是什么考试题目啊!