Show a clock on the desktop
Show a clock on the desktop
API Declarations
Private Declare Function FindWindowEx Lib "user32" _
Alias "FindWindowExA" (ByVal hWnd1 As Long, _
ByVal hWnd2 As Long, ByVal lpsz1 As String, _
ByVal lpsz2 As String) As Long
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
'set borderstyle to 0-none
'add a timer
'set interval to 1000
Rate Show a clock on the desktop
(1(1 Vote))
Dim hdesktop As Long
hdesktop = FindWindowEx(0&, 0&, "progman", vbNullString)
SetParent hWnd, hdesktop
Width = TextWidth("99:99:99:")
Height = TextHeight("99:99:99:")
Left = Screen.Width - Me.Width - 100
Top = 100
BackColor = vbDesktop
End Sub
Private Sub Timer1_Timer()
Cls: Print Time$
End Sub
Show a clock on the desktop Comments
No comments yet — be the first to post one!
Post a Comment