|
-
Sep 27th, 2000, 06:34 PM
#1
Thread Starter
Fanatic Member
How do you make the taskbar disappear and I also want the icons to disappear!!!
Visual Basic 6.0
Visual C++ 5
Delphi 5

-
Sep 27th, 2000, 06:37 PM
#2
_______
<?>
Code:
' hide and show the taskbar
' put his in a bas module
Option Explicit
Dim hwnd1 As Long
Public Declare Function SetWindowPos Lib "user32" _
(ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As _
Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags _
As Long) As Long
Public Declare Function FindWindow Lib "user32" _
Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName _
As String) As Long
Const SWP_HIDEWINDOW = &H80
Const SWP_SHOWWINDOW = &H40
'<<<<< form event >>>>>>>
show'
Call SetWindowPos(hwnd1, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
'hide
hwnd1 = FindWindow("Shell_traywnd", "")
Call SetWindowPos(hwnd1, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Sep 27th, 2000, 06:38 PM
#3
Using ShowWindow might be easier.
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
Private Sub Command1_Click()
'Hides the TaskBar. Change 0 to a 1 if you want to show it.
ShowWindow FindWindowEx(0, 0, "Shell_TrayWnd", vbNullString), 0
End Sub
-
Sep 27th, 2000, 06:41 PM
#4
This will hide/show the taskbar and the icons as well.
Code:
Declare Function findwindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public 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
Declare Function showWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Public Const SW_HIDE = 0
Public Const SW_SHOW = 5
Dim progman&
Dim shelldlldefview&
Dim syslistview&
Dim tray&
Private Command1_Click()
progman& = findwindow("progman", vbNullString)
shelldlldefview& = FindWindowEx(progman&, 0&, "shelldll_defview", vbNullString)
syslistview& = FindWindowEx(shelldlldefview&, 0&, "syslistview32", vbNullString)
tray& = findwindow("Shell_TrayWnd", vbNullString)
Y = showwindow(syslistview&, SW_HIDE)
X = showwindow(tray&, SW_HIDE)
End Sub
Private Command2_Click()
progman& = findwindow("progman", vbNullString)
shelldlldefview& = FindWindowEx(progman&, 0&, "shelldll_defview", vbNullString)
syslistview& = FindWindowEx(shelldlldefview&, 0&, "syslistview32", vbNullString)
tray& = findwindow("Shell_TrayWnd", vbNullString)
Y = showwindow(syslistview&, SW_SHOW)
X = showwindow(tray&, SW_SHOW)
End Sub
-
Sep 27th, 2000, 07:00 PM
#5
_______
<?>
Thanks Megatron 
I'll update my code.
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
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
|