View Poll Results: please help me
- Voters
- 0. You may not vote on this poll
-
Jan 29th, 2001, 08:51 PM
#1
Thread Starter
New Member
I need to hide the taskbar with API when i run any form
and unhide the taskbar when i close or unload the form
-
Jan 29th, 2001, 09:59 PM
#2
Use the FindWindow API function to find the taskbar, and the ShowWindow API function to show or hide it.
Code:
Private Declare Function FindWindow Lib "user32" _
Alias "FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" _
Alias "ShowWindow" (ByVal hwnd As Long, ByVal _
nCmdShow As Long) As Long
Private Const SW_HIDE = 0
Private Const SW_SHOW = 5
Dim tray&
Dim shtray&
Private Sub Form_Load()
tray& = FindWindow ("Shell_TrayWnd", vbNullString)
shtray& = ShowWindow(tray&, SW_HIDE)
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
tray& = FindWindow("Shell_TrayWnd", vbNullString)
shtray& = ShowWindow(tray&, SW_SHOW)
End Sub
-
Jan 30th, 2001, 02:29 PM
#3
Lively Member
Shell_TrayWnd
How did you find out the class name (if that's the right term) was Shell_TrayWnd?
On Error Resume Screaming...

-
Jan 30th, 2001, 02:34 PM
#4
I used a API/Window's Spy.
-
Jan 30th, 2001, 03:15 PM
#5
Use Spy++, which is shipped with Visual Studio.
-
Jan 31st, 2001, 03:47 PM
#6
Lively Member
Spy++
I don't have Spy++, I think it's because I didn't get the full Visual Studios. I only got the VB6 portion of it.
On Error Resume Screaming...

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
|