Reputation: 41
How to show/hide taskbar from a desktop shortcut without opening settings menu
Upvotes: 3
Views: 10941
Reputation: 340
On Windows 11, Enable autohide and press the Windows key like you're going to search for something. This will display the taskbar. You can also press the Win+T if you don't want the search window to open.
Upvotes: 0
Reputation: 1
You need to enable autohide mode in settings.
ToggleTaskbar()
{
Static A_WinID := ""
If Not WinActive("ahk_class Shell_TrayWnd")
{
A_WinID := WinExist("A")
WinShow, ahk_class Shell_TrayWnd
WinActivate, ahk_class Shell_TrayWnd
}
Else
{
If A_WinID
{
WinActivate, ahk_id %A_WinID%
A_WinID := ""
}
}
}
Upvotes: -1
Reputation: 1
You can do it by using AHK . AutoHotKey. If you hide it, there is going to be a transparent taskbar. so the best thing is setting it to AUTOHIDE.1) install ahk 2) go to desktop , right click , create ahk script 3) open with notepad, delete everything , paste next 4)open script use ALT+BACKSPACE & CTRL+BACKSPACE
;Show taskbar
; ctrl + Backspace Set AUTO HIDE TASKBAR OFF
^Backspace::
HideShowTaskbar2(False)
HideShowTaskbar2(action)
{
static ABM_SETSTATE := 0xA, ABS_AUTOHIDE := 0x1, ABS_ALWAYSONTOP := 0x2
VarSetCapacity(APPBARDATA, size := 2*A_PtrSize + 2*4 + 16 + A_PtrSize, 0)
NumPut(size, APPBARDATA), NumPut(WinExist("ahk_class Shell_TrayWnd"), APPBARDATA, A_PtrSize)
NumPut(action ? ABS_AUTOHIDE : ABS_ALWAYSONTOP, APPBARDATA, size - A_PtrSize)
DllCall("Shell32\SHAppBarMessage", UInt, ABM_SETSTATE, Ptr, &APPBARDATA)
}
Return
;Hide taskbar
; Alt + Backspace Set AUTO HIDE TASKBAR ON
!Backspace::
HideShowTaskbar(True)
HideShowTaskbar(action)
{
static ABM_SETSTATE := 0xA, ABS_AUTOHIDE := 0x1, ABS_ALWAYSONTOP := 0x2
VarSetCapacity(APPBARDATA, size := 2*A_PtrSize + 2*4 + 16 + A_PtrSize, 0)
NumPut(size, APPBARDATA), NumPut(WinExist("ahk_class Shell_TrayWnd"), APPBARDATA, A_PtrSize)
NumPut(action ? ABS_AUTOHIDE : ABS_ALWAYSONTOP, APPBARDATA, size - A_PtrSize)
DllCall("Shell32\SHAppBarMessage", UInt, ABM_SETSTATE, Ptr, &APPBARDATA)
}
return
Upvotes: -1
Reputation: 19
Actually you will have to do it manually . Right click on task bar then go to taskbar settings then turn on Automatically hide the taskbar in desktop mode then simply you can press ctrl+Esc to see taskbar from any window.
Upvotes: 1