[填空题] 下列程序运行时,单击窗体,执行结果为 【12】 。 说明:在窗体上有一Label控件,名为lblDate。 Dim Y As Integer,m As Integer,d As Inte

8 查阅

[填空题] 下列程序运行时,单击窗体,执行结果为 【12】 。 说明:在窗体上有一Label控件,名为lblDate。 Dim Y As Integer,m As Integer,d As Integer,w1 As Integer Dim Rq As Date Dim W2 As String Private Sub Form_Click() Rq=Date Y=Year(Rq): m=Month(Rq)∶d=Day(Rq) w1=Weekday(x) Select Case w1Case 1 W2="日"Case 2 W2="一"Case 3 W2="二"Case 4 W2="三"Case 5 W2="四"Case 6 W2="五"Case 7 W2="六" End Select bldate.Caption="今天是"&Y&"年"&m&"月"&d&"日"&"星期"&W2 End SUb

参考答案:

今天是****年**月*/日星期*

例如在2003年元月10日执行该程序,界面上将显示: 今天是2002年1月10日星期五

计算机考试