Results 1 to 5 of 5

Thread: Making the taskbar disappear!!!

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    879

    Angry

    How do you make the taskbar disappear and I also want the icons to disappear!!!
    Visual Basic 6.0
    Visual C++ 5
    Delphi 5


  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    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

  3. #3
    Guest
    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

  4. #4
    Guest
    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

  5. #5
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    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
  •  



Click Here to Expand Forum to Full Width