[系统]显示隐藏整个任务栏

显示隐藏整个任务栏

使用方法:

  • 保存后直接运行就能看到效果!
  • F8显示为带拉伸桌面效果的!
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

hw_tray := DllCall( "FindWindowEx", "uint",0, "uint",0, "str","Shell_TrayWnd", "uint",0 )
MsgBox, % hw_tray
WinHide, ahk_id %hw_tray%
MsgBox, 隐藏
WinShow, ahk_id %hw_tray%
MsgBox, 显示
return

;~ 简单版
WinHide ahk_class Shell_TrayWnd   ;隐藏任务栏
WinShow ahk_class Shell_TrayWnd  ;显示任务栏

;可以拉伸桌面的版
F8::
	VarSetCapacity( APPBARDATA, 36, 0 )
	IfWinNotExist, ahk_class Shell_TrayWnd
	{
		NumPut( (ABS_AlwaysOnTOP := 0x2), APPBARDATA, 32, "UInt" )           ;Enable "Always on top" (& disable auto-hide)
		DllCall( "Shell32.dll\SHAppBarMessage", "UInt", ( ABM_SETSTATE := 0xA ), "UInt", &APPBARDATA )
		WinShow ahk_class Shell_TrayWnd
	}
	else
	{
		NumPut( ( ABS_AUTOHIDE := 0x1 ), APPBARDATA, 32, "UInt" )            ;Disable "Always on top" (& enable auto-hide to hide Start button)
		DllCall( "Shell32.dll\SHAppBarMessage", "UInt", ( ABM_SETSTATE := 0xA ), "UInt", &APPBARDATA )
		WinHide ahk_class Shell_TrayWnd
	}

return

 

亲爱的朋友们,如果你认为本站不错请打赏,我们非常感谢你的支持!

[su_button url=”http://www.autoahk.com/buyamoney” style=”3d” color=”#ffe41c” size=”20″ radius=”round”]赏[/su_button]



给TA捐赠
共{{data.count}}人
人已捐赠
其他

[托盘管理]为AutoHotkey的托盘图标增加左键单击、双击事件动作

2017-3-9 20:26:00

其他案例

[办公][Excel]Excel简单一键求和 Autohotkey

2017-3-14 14:57:36

3 条回复 A文章作者 M管理员
  1. iuy

    直接复制代码吗

  2. TIAMO

    按那个按键啊

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索