|
-
Apr 19th, 2001, 07:36 PM
#1
Thread Starter
Frenzied Member
What API calls can be used to show/hide the systray
clock if it is not showing as if you right click on the
taskbar, click Properties, and uncheck Show Clock?
This code does not work:
Code:
lHwnd = FindWindowEx(0, 0, "Shell_TrayWnd", vbNullString)
lHwnd = FindWindowEx(lHwnd, 0, "TrayNotifyWnd", vbNullString)
lHwnd = FindWindowEx(lHwnd, 0, "TrayClockWClass", vbNullString)
Call ShowWindow(lHwnd, 5)
-
Apr 19th, 2001, 08:36 PM
#2
Try this:
Code:
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 ShowWindow Lib "user32" _
(ByVal hwnd As Long, ByVal nCmdShow As Long) As _
Long
Dim shelltraywnd As Long, traynotifywnd As Long, trayclockwclass As Long
Private Sub Form_Load()
shelltraywnd = FindWindowEx(0, 0, "shell_traywnd", _
vbNullString)
traynotifywnd = FindWindowEx(shelltraywnd, _
0&, "traynotifywnd", vbNullString)
trayclockwclass = FindWindowEx(traynotifywnd, _
0&, "trayclockwclass", vbNullString)
ShowWindow trayclockwclass, 5
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|