用VB怎么怎么样返回时间,格式为"xx年xx月xx日 星期几 系统时间hh:mm:ss"秒钟会动
来源:百度知道 编辑:UC知道 时间:2024/05/29 05:30:08
Private Sub Form_Load()
Me.Caption = Year(Date) & "年" & Month(Date) & "月" & Day(Date) & "日 星期" & GetWD(Weekday(Date)) & " 系统时间" & Format$(Time, "hh:mm:ss")
Timer1.Interval = 500
End Sub
'xx年xx月xx日 星期几 系统时间hh:mm:ss
Private Sub Timer1_Timer()
Me.Caption = Year(Date) & "年" & Month(Date) & "月" & Day(Date) & "日 星期" & GetWD(Weekday(Date)) & " 系统时间" & Format$(Time, "hh:mm:ss")
'"xx年xx月xx日 星期几 系统时间hh:mm:ss"
End Sub
Function GetWD(ByVal Week As Integer) As String
Select Case Week
Case 1
GetWD = "日"
Case 2
GetWD = "一"
Case 3
GetWD = "二"
Case 4
GetWD = "三"
Case 5
GetWD = "四"
Case 6
GetWD = &