求教:VB做桌面时钟和桌面日历

来源:百度知道 编辑:UC知道 时间:2024/05/14 10:37:05
如题 发上完整代码

Private Sub Form_Load()
Dim dat As Date, dat2 As Date, d As Long, w As Long
Dim i As Long, s As String
dat = DateSerial(Year(Date), Month(Date), 1)
If Month(Date) = 12 Then dat2 = DateSerial(Year(Date) + 1, 1, 1) Else dat2 = DateSerial(Year(Date), Month(Date) + 1, 1)
d = DateDiff("d", dat, dat2)
AutoRedraw = True
Print " 日 一 二 三 四 五 六"
w = Weekday(dat)
s = Space(3 * (w - 1))
For i = 1 To d
s = s & " " & IIf(i < 10, "0", "") & i
w = w + 1
If w > 7 Then
w = 1
Print s
s = ""
End If
Next
Print s
End Sub

什么是VB做桌面时钟和桌面日历

做个窗口,borderstyle=0,一直让它在最后面(桌面上面)不就完了