How to Hide , Disable or Replace Windows Start Button ?http://www.autohotkey.com/forum/viewtopic.php?p=54863#54863- To Hide/Show "Windows Start Button"
Code:
Control, Hide, , Button1, ahk_class Shell_TrayWnd
Sleep, 5000
Control, Show, , Button1, ahk_class Shell_TrayWnd
- To Disable/Enable "Windows Start Button"
Code:
Control, Disable, , Button1, ahk_class Shell_TrayWnd
Sleep, 5000
Control, Enable, , Button1, ahk_class Shell_TrayWnd
Replacing the "Windows Start Button" :We have to
Hide the
Start Button first! The space occupied by
Start Button will be empty now.
I guess we cannot add a button directly to it.
BUT!... With a
DllCall to
"User32.dll\SetParent" function you can set a
GUI to be a
"
child window" to the
Taskbar & the
GUI will contain the button.
Thats it ..
Important : The
child GUI has a Button whose
ClassNN will be
Button1 (the same as
Start Button !!!).
It is therefore imperative to issue a "
GUI, Destroy" before attempting to
Control, Show the "
Start Button"
Related Posts for Reference :Edit: Feedback will be highly appreciated!Edit: Posted @
WISH LIST : I wish some examples were given for "Control" Command... Posted: 02-Apr-2006
I have an "Always Running Script" which has a very large & deep "Tray Menu". (My own "Start Menu")
When I forget the assigned Hotkeys to various tasks, this "Tray Menu" comes to my rescue.
I was calling the "Tray Menu" with a Hotkey Command - #Q::Menu,Tray,Show,5,5
I present a more effective way of Showing the Tray menu of a Script
. ____________
Code:
#Persistent
#SingleInstance, Ignore
#NoTrayIcon
Control, Hide, , Button1, ahk_class Shell_TrayWnd
OnExit, Exitt
Gui, +ToolWindow -Caption
Gui, +Lastfound
GUI_ID := WinExist()
WinGet, TaskBar_ID, ID, ahk_class Shell_TrayWnd
DllCall("SetParent", "uint", GUI_ID, "uint", Taskbar_ID)
Gui, Margin,0,0
Gui, Font, S12 Bold, Times New Roman
Gui, Add,Button, w45 h30 gStartM, Start
Gui, Font, S8 Bold, Arial
Gui, Add,Button, x+0 w63 h30 gQuickM, My Menu
Gui, Show,x0 y0 AutoSize
Return
StartM:
Send ^{ESCAPE}
return
QuickM:
Menu,Tray,Show
return
Exitt:
Gui,Destroy
Control, Show, , Button1, ahk_class Shell_TrayWnd
ExitApp
Return