以下是引用我是菜鸟哦在2010-8-18 21:28:39的发言:
算了,还是给你写出来吧,晕。。。。。。
Private Sub Command1_Click()
Dim i As Integer
i = 1 '你的那个weekday函数
If i = 1 Or i = 7 Then
Me.ForeColor = vbRed
Else
Me.ForeColor = vbBlack
End If
Me.Print “星期” + Mid("日一二三四五六", i, 1)
Print
End Sub
Private Sub Form_Load()
Me.ScaleMode = 3
Me.FontSize = 12
Label1.FontSize = 12
Label1.BackStyle = 0
Label1.Caption = "今天是"
Me.CurrentX = Label1.Left + Me.TextWidth("今天是")
Me.CurrentY = Label1.Top
End Sub
觉得这样好一点
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim Week As Long
Week = Weekday(Date)
Select Case Week
Case 1
Label2.ForeColor = &HFF& '颜色
Label2 = "星期日"
Case 2
Label2 = "星期一"
Case 3
Label2 = "星期二"
Case 4
Label2 = "星期三"
Case 5
Label2 = "星期四"
Case 6
Label2 = "星期五"
Case 7
Label2.ForeColor = &H8080FF '颜色
Label2 = "星期六"
End Select
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Date & Space(9) & Time
End Sub
把 Label2(置前) 放到 Label1 中间
[
本帖最后由 yujimin 于 2010-8-18 22:22 编辑 ]