Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> Visual Basic >> Snippet

Hide the Window's taskbar


Private Declare Function ShowWindow Lib "user32" _
   ( ByVal hwnd As Long , ByVal nCmdShow As Long ) As Long
Private Declare Function FindWindow Lib "user32" _
    Alias "FindWindowA" ( ByVal lpClassName As String , _
    ByVal lpWindowName As String ) As Long
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

Sub TaskBar(Display As Boolean )
    Dim iHandle As Long
    Dim iStartButton As Long

   iHandle = FindWindow( "Shell_TrayWnd" , "" )
   
    If Display Then
       ShowWindow iHandle, 5
    Else
       ShowWindow iHandle, 0
    End If
End Sub