Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bring back taskbar without rebooting

Status
Not open for further replies.

seminole

Technical User
Aug 12, 2001
3
US
I have an application that I need to kill the taskbar and then bring it back without closing the application. I am using two API's in a module:
Private Declare Function PostMessage Lib "user32.dll" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long

Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Then I have sub in the same module to kill the taskbar which I call from the standard module:

Public Sub KillApplicationBar()
Dim hwnd As Long, x As Long, y As Long
hwnd = FindWindow("Shell_TrayWnd", "")
PostMessage hwnd, 2, 0, 0
End Sub

I have tried using the SendMessage API but cannot get the taskbar back without rebooting. What do I need to look at?
Thank you in advance for any help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top