Remove another app's SysTray icon?
Posted: Fri Jun 14, 2013 5:36 pm
Is it possible (by knowing the owning window handle & PID) to manipulate (change/hide) its systray icon?
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
hnd = FindWindow_("Shell_TrayWnd", #Null)
hnd = FindWindowEx_(hnd, #Null, "TrayNotifyWnd", #Null)
hnd = FindWindowEx_(hnd,#Null, "SysPager", #Null)
hnd = FindWindowEx_(hnd, #Null, "ToolbarWindow32", #Null)
Count = SendMessage_(hnd, #TB_BUTTONCOUNT,0, 0)
SendMessage_(hnd, #TB_HIDEBUTTON,index, 1) ;Hide index = 0 the icon at right edge
Delay(2000)
SendMessage_(hnd, #TB_HIDEBUTTON,index, 0) ;Show