Hey All,
I would like to prevent the taskbar from updating. I have seen code that
hides / unhides, like that below:
Dim handleW1 As Long
Private Declare Function FindWindowA Lib "user32" _
(ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Declare Function SetWindowPos Lib "user32" _
(ByVal handleW1 As Long, _
ByVal handleW1InsertWhere As Long, ByVal w As Long, _
ByVal x As Long, ByVal y As Long, ByVal z As Long, _
ByVal wFlags As Long) As Long
Public Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As
Long) As Long
Const TOGGLE_HIDEWINDOW = &H80
Const TOGGLE_UNHIDEWINDOW = &H40
Function HideTaskbar()
handleW1 = FindWindowA("Shell_traywnd", "")
Call SetWindowPos(handleW1, 0, 0, 0, 0, 0, TOGGLE_HIDEWINDOW)
End Function
Function UnhideTaskbar()
Call SetWindowPos(handleW1, 0, 0, 0, 0, 0, TOGGLE_UNHIDEWINDOW)
End Function
However, if I try to take that handle and use in a LockWindowUpdate call, it
does not lock the taskbar window and icons continue to appear and reappear.
Is there a way to lock the taskbar or prevent certain windows or
applications from adding icons?
Thanks,
Todd
Dean Earley - 18 Jun 2008 16:37 GMT
> Hey All,
>
[quoted text clipped - 33 lines]
> Is there a way to lock the taskbar or prevent certain windows or
> applications from adding icons?
Don't use LockWindowUpdate for that, it's not what it's designed for.
Try the WM_SETREDRAW message.
Check:
http://blogs.msdn.com/oldnewthing/archive/2007/02/19/1716211.aspx
And the following articles.

Signature
Dean Earley (dean.earley@icode.co.uk)
i-Catcher Development Team
iCode Systems
TC - 18 Jun 2008 19:05 GMT
Hey Dean,
Thanks!
Todd
>> Hey All,
>>
[quoted text clipped - 40 lines]
> http://blogs.msdn.com/oldnewthing/archive/2007/02/19/1716211.aspx
> And the following articles.