Page 1 of 1

Remove another app's SysTray icon?

Posted: Fri Jun 14, 2013 5:36 pm
by jassing
Is it possible (by knowing the owning window handle & PID) to manipulate (change/hide) its systray icon?

Re: Remove another app's SysTray icon?

Posted: Sat Jun 15, 2013 7:28 am
by RASHAD
Hi jassing
If you know the index of the system tray icon so it is so easy
If you do not, search the forum for enumerate systray icon by NM,luis or RASHAD

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

Re: Remove another app's SysTray icon?

Posted: Sat Jun 15, 2013 2:16 pm
by jassing
Thank you (again) Rashad!