Jump to content

Deactivate Windows TAskbar permanently (Vista ( Windows /)


 Share

Recommended Posts

Hi,

a question concerning the taskbar. I have an HTPC and want to hide it permanently. I know that there is an option to hide it, but this does not really help since it appears in some cases. With Windows XP i fond a script (vbs) that could hide it. Unfortunately it does not work with Vidsa or Windows 7. The taskbar disappears but the Windows Start button stays. So the question would be if there is an solution for this under Vista or 7.

Or is there a registry hack that can do it?

Here is the script I found for XP

Regards Alex

Edited by bentom
Link to comment
Share on other sites

For the sake of completeness and (since this an Autoit forum) I`ll give an autoit solution to hide (not kill forever) the taskbar and start button in XP and vista

call the function using _ShowTaskBar(0) to show and _ShowTaskBar(1) to hide.

Func _ShowTaskBar($fShow)
    Local $hTaskBar
    If @OSVersion = "WIN_VISTA" Then _ShowStartButton($fShow)
    $hTaskBar = _WinAPI_FindWindow("Shell_TrayWnd", "")
    If $fShow=0 Then
        _WinAPI_ShowWindow($hTaskBar, @SW_SHOW)
    Else
        _WinAPI_ShowWindow($hTaskBar, @SW_HIDE)
    EndIf
EndFunc   ;==>_ShowTaskBar

Func _ShowStartButton($fShow )
    Local $hTaskBar, $hStartButton
    If @OSVersion = "WIN_VISTA" Then
        $hStartButton = _WinAPI_FindWindow("Button", "Start")
    Else
        $hTaskBar = _WinAPI_FindWindow("Shell_TrayWnd", "")
        $hStartButton = ControlGetHandle($hTaskBar, "", "Button1")
    EndIf
    If $fShow=0 Then
        _WinAPI_ShowWindow($hStartButton, @SW_SHOW)
    Else
        _WinAPI_ShowWindow($hStartButton, @SW_HIDE)
    EndIf
EndFunc   ;==>_ShowStartButton
Link to comment
Share on other sites

@picea892

That doesn't seem to work (fully) in Win7. The taskbar "disappears" but still blocks maximized windows.

Edit: To clarify, that was with AutoIt 3.3.0.0, it blows up completely with 3.3.1.1 >_<

Edited by AdmiralAlkex
Link to comment
Share on other sites

I don`t have windows 7 to test and really don't know why it would completely blow up.....but, could be two problems. 1)When I query operating system. The below function was found over in the example on aero glass. It appears the "OsVersion for windows 7 is "WIN_2008", so need to add that option in. Other problem could be that the button is called something different then vista....I'm betting on error 1

Func _OsLevel()
    Local $ver = @OSVersion
    Local $winVersions[9] = ["WIN_95", "WIN_98", "WIN_ME", "WIN_NT4", "WIN_2000", _
            "WIN_XP", "WIN_2003", "WIN_VISTA", "WIN_2008"]

    For $i = $WIN_95 To UBound($winVersions) - 1
        If $winVersions[$i] = $ver Then Return $i
    Next
EndFunc ;==>_OsLevel

So if it is error 1 the below tweak should fix it. Give it a try if you like. Otherwise maybe someone will come along who can help.

Func _ShowTaskBar($fShow)
    Local $hTaskBar
    If @OSVersion = "WIN_VISTA" or @OSVersion = "WIN_2008" Then _ShowStartButton($fShow)
    $hTaskBar = _WinAPI_FindWindow("Shell_TrayWnd", "")
    If $fShow=0 Then
        _WinAPI_ShowWindow($hTaskBar, @SW_SHOW)
    Else
        _WinAPI_ShowWindow($hTaskBar, @SW_HIDE)
    EndIf
EndFunc   ;==>_ShowTaskBar

Func _ShowStartButton($fShow )
    Local $hTaskBar, $hStartButton
    If @OSVersion = "WIN_VISTA" or @OSVersion = "WIN_2008" Then
        $hStartButton = _WinAPI_FindWindow("Button", "Start")
    Else
        $hTaskBar = _WinAPI_FindWindow("Shell_TrayWnd", "")
        $hStartButton = ControlGetHandle($hTaskBar, "", "Button1")
    EndIf
    If $fShow=0 Then
        _WinAPI_ShowWindow($hStartButton, @SW_SHOW)
    Else
        _WinAPI_ShowWindow($hStartButton, @SW_HIDE)
    EndIf
EndFunc   ;==>_ShowStartButton
Edited by picea892
Link to comment
Share on other sites

  • 2 years later...

Welcome to Autoit. Put your vbs and notepad away....no need for that here. From the autoit site you can download the full install. It has Scite which is a very powerful editor and a compiler called Aut2exe.exe

Using that....any autoit script can be turned into an exe. Of course you can use notepad...but Scite is so much better.

For the code above a complete working example is. You can run it from scite by pressing F5. Or you can compile it using aut2exe and run it just like any exe. Have fun.

#include <Misc.au3>
#Include <WinAPI.au3>
$dll = DllOpen("user32.dll")
Global $onoff=1
While 1
    Sleep ( 50 )
    If _IsPressed("41", $dll) Then ; A pressed
  _ShowTaskBar($onoff)
elseif _IsPressed("51", $dll) Then ;Q pressed
  ExitLoop
    EndIf
WEnd
DllClose($dll)
Func _ShowTaskBar($fShow)
if $onoff=0 Then
  $onoff=1
Else
  $onoff=0
EndIf
    Local $hTaskBar
    If @OSVersion = "WIN_VISTA" or @OSVersion = "WIN_2008" Then _ShowStartButton($fShow)
    $hTaskBar = _WinAPI_FindWindow("Shell_TrayWnd", "")
    If $fShow=0 Then
        _WinAPI_ShowWindow($hTaskBar, @SW_SHOW)
    Else
        _WinAPI_ShowWindow($hTaskBar, @SW_HIDE)
    EndIf
EndFunc   ;==>_ShowTaskBar
Func _ShowStartButton($fShow )
    Local $hTaskBar, $hStartButton
    If @OSVersion = "WIN_VISTA" or @OSVersion = "WIN_2008" Then
        $hStartButton = _WinAPI_FindWindow("Button", "Start")
    Else
        $hTaskBar = _WinAPI_FindWindow("Shell_TrayWnd", "")
        $hStartButton = ControlGetHandle($hTaskBar, "", "Button1")
    EndIf
    If $fShow=0 Then
        _WinAPI_ShowWindow($hStartButton, @SW_SHOW)
    Else
        _WinAPI_ShowWindow($hStartButton, @SW_HIDE)
    EndIf
EndFunc   ;==>_ShowStartButton
Edited by picea892
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...