Page 1 of 1

How can i remove a window from taskbar and Alt+Tab window but still have access to it through an hotkey?

Posted: 05 Aug 2016, 09:01
by DeepMind
yeah, like i said i want nothing appears in taskbar and in Alt+Tab switch but still whenever i click the hotkey that i defined i can bring the window up. and the window I want to do this to, is notepad

Re: How can i remove a window from taskbar and Alt+Tab window but still have access to it through an hotkey?

Posted: 05 Aug 2016, 09:20
by Masonjar13
Hide/Show the window on a hotkey.

Re: How can i remove a window from taskbar and Alt+Tab window but still have access to it through an hotkey?

Posted: 07 Aug 2016, 02:18
by DeepMind
Masonjar13 wrote:Hide/Show the window on a hotkey.
I will try it tnx

Re: How can i remove a window from taskbar and Alt+Tab window but still have access to it through an hotkey?

Posted: 31 May 2017, 06:14
by niczoom
I was looking to do the same/similar. I pulled the following code from here https://autohotkey.com/board/topic/8107 ... es-in-ahk/.

Code: Select all

#SingleInstance Force
#Persistent

IID := "{56FDF342-FD6D-11d0-958A-006097C9A090}", CLSID := "{56FDF344-FD6D-11d0-958A-006097C9A090}", S_OK := 0x00

ptr := ComObjCreate(CLSID, IID)
vtbl := NumGet(ptr + 0, 0, "Ptr")

hrInit := NumGet(vtbl + 0, 3 * A_PtrSize, "Ptr")
addTab := NumGet(vtbl + 0, 4 * A_PtrSize, "Ptr")
deleteTab := NumGet(vtbl + 0, 5 * A_PtrSize, "Ptr")

if (DllCall(hrInit, "Ptr", ptr) != S_OK)
{
MsgBox Error!
ExitApp
}

WinGet, WMC_ID, ID, ahk_exe ehshell.exe
DllCall(deleteTab, "Ptr", ptr, "Ptr", WMC_ID)
I was looking to hide my Windows Media Centers button on the taskbar and from the Alt-Tab menu, this accomplishes it whilst still leaving the window accessible from my AHK script.

To bring the button back just add

Code: Select all

DllCall(addTab, "Ptr", ptr, "Ptr", WMC_ID)
.

Works a treat.

Re: How can i remove a window from taskbar and Alt+Tab window but still have access to it through an hotkey?

Posted: 02 Jun 2017, 23:20
by jeeswg
@niczoom
For me, on Windows 7, Aero mode off, that script seemed to remove the taskbar button but not the alt-tab button. Nice script though.

I tried many things (re. window styles/ex. styles, owner/parent), the only thing I have so far:

Code: Select all

q:: ;hide from alt-tab menu
;works but changes the title bar appearance:
WinSet, ExStyle, % +0x80, ahk_class Notepad ;WS_EX_TOOLWINDOW := 0x80
return

Re: How can i remove a window from taskbar and Alt+Tab window but still have access to it through an hotkey?

Posted: 04 Jun 2017, 08:57
by niczoom
Not sure why it left your Alt-Tab and/or Win-Tab button/image still visible, I'm using Win 10 and do not have this problem.