|
-
Feb 18th, 2006, 01:51 PM
#1
Thread Starter
Addicted Member
Refresh Tasbbar Help with code
Hey. I have some code to refresh the windows taskbar, but it doesn't seem to work... heres what I have:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr
Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As IntPtr, ByVal wMsg As Integer, ByVal wParam As Integer, ByRef lParam As Integer) As Integer
Private Const WM_PAINT As Integer = &HF&
Dim taskbarHandle As IntPtr = FindWindow("SHELL_TRAYWND", String.Empty)
SendMessage(taskbarHandle, WM_PAINT, 0, 0)
I put the second part under a command button and when I click it, it does nothing. I have some icons in the taskbar that aren't actually there, so they should dissappear when I do this. Can someone get this to work please?
Thanks
John
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
|