Page 1 of 1

Icon in taskbar(toolbar)

Posted: 18 Oct 2016, 08:57
by fedek
Is there any way to hide an icon of running programm in taskbar( or toolbar - i dont know how to call it in English. Nor tray )

Re: Icon in taskbar(toolbar)

Posted: 18 Oct 2016, 09:31
by Capn Odin

Re: Icon in taskbar(toolbar)

Posted: 20 Oct 2016, 08:54
by fedek
Not tray. Theese or that. - http://prntscr.com/cwoqto

Re: Icon in taskbar(toolbar)

Posted: 20 Oct 2016, 14:55
by Capn Odin
I doubt this is the best approach, but you can make your window a ToolWindow.

Code: Select all

Gui, +ToolWindow

Re: Icon in taskbar(toolbar)

Posted: 20 Oct 2016, 18:53
by tidbit
gui, +owner

Re: Icon in taskbar(toolbar)

Posted: 21 Oct 2016, 13:14
by fedek
Could you write a script which will hide skype`s icon in Toolbar, please?

Re: Icon in taskbar(toolbar)

Posted: 21 Oct 2016, 13:36
by tidbit
hiding another programs? that won't be so straight forward (I have no idea how. seems quite complex). Capn Odin & mine were for gui's made in AHK.

Re: Icon in taskbar(toolbar)

Posted: 21 Oct 2016, 13:50
by drawback

Re: Icon in taskbar(toolbar)

Posted: 22 Oct 2016, 08:17
by fedek
Ok, how to hide skype for example?

Re: Icon in taskbar(toolbar)

Posted: 22 Oct 2016, 08:59
by drawback

Code: Select all

#Include TrayIcon.ahk

trayIcons := TrayIcon_GetInfo()

Loop, % trayIcons.MaxIndex()
	if (trayIcons[A_Index].process = "skype.exe")
		TrayIcon_Remove(trayIcons[A_Index].hwnd, trayIcons[A_Index].uid)


Re: Icon in taskbar(toolbar)

Posted: 23 Oct 2016, 05:54
by fedek
Works only with tray. :/

Re: Icon in taskbar(toolbar)

Posted: 23 Oct 2016, 09:30
by qwerty12

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

ITaskbarList := ComObjCreate("{56FDF344-FD6D-11d0-958A-006097C9A090}", "{56FDF342-FD6D-11d0-958A-006097C9A090}")

if (DllCall(NumGet(NumGet(ITaskbarList+0)+3*A_PtrSize), "Ptr", ITaskbarList) == 0) ; ITaskbarList::HrInit
{
	if (DllCall("IsTopLevelWindow", "Ptr", (skypeHwnd := WinExist("Skype™‎ - ahk_class tSkMainForm")))) {
		DllCall(NumGet(NumGet(ITaskbarList+0)+5*A_PtrSize), "Ptr", ITaskbarList, "Ptr", skypeHwnd) ; ITaskbarList::DeleteTab
		/*
			Sleep 1000
			DllCall(NumGet(NumGet(ITaskbarList+0)+4*A_PtrSize), "Ptr", ITaskbarList, "Ptr", skypeHwnd) ; ITaskbarList::AddTab
		*/
	}
}
ObjRelease(ITaskbarList)
EDIT: Can be found in the official documentation, too: DllCall#Examples

Even better: Skype->Tools->Options->Advanced->[ ] Keep Skype in the taskbar while [you're] signed in...