How to Hide another application's tray icon?
-
Hi Recently I needed to hide an application window so I used the ShowWindow of the API and could hide it from taskbar But this application has a tray icon too, How can I hide tray icon? And also is there a way to make the application to stay at background completely what I mean is that when I use ShowWindow function This application is show for a second an then is hidden so it is visibile for half of a second. Is there any better way to make it invisible completely? Michael Lopez
-
Hi Recently I needed to hide an application window so I used the ShowWindow of the API and could hide it from taskbar But this application has a tray icon too, How can I hide tray icon? And also is there a way to make the application to stay at background completely what I mean is that when I use ShowWindow function This application is show for a second an then is hidden so it is visibile for half of a second. Is there any better way to make it invisible completely? Michael Lopez
Hi, you can send Windows commands to the tray icons, making them invisible, or even removing them alltogether. Although its purpose is slightly different, you may find a lot of details about it in my TrayIconBuster article. :)
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips: - use PRE tags to preserve formatting when showing multi-line code snippets - before you ask a question here, search CodeProject, then Google
-
Hi Recently I needed to hide an application window so I used the ShowWindow of the API and could hide it from taskbar But this application has a tray icon too, How can I hide tray icon? And also is there a way to make the application to stay at background completely what I mean is that when I use ShowWindow function This application is show for a second an then is hidden so it is visibile for half of a second. Is there any better way to make it invisible completely? Michael Lopez
-
Hi, you can send Windows commands to the tray icons, making them invisible, or even removing them alltogether. Although its purpose is slightly different, you may find a lot of details about it in my TrayIconBuster article. :)
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips: - use PRE tags to preserve formatting when showing multi-line code snippets - before you ask a question here, search CodeProject, then Google
Hi Thanks I could hide the tray icon. So I wanted to make it Permanent I mean My applicaiton should always check and hide this application If it has become visible again (Remove both taskbar and trayicon again) So I used code below (most of your code) But Application's main windows only becomes hidden one time and not for other times. if (filename != null) { filename = filename.ToLower(); if (filename.Contains("application.exe")) { //To get the Application Main handle (hide from taskbar) p = Process.GetProcessesByName("Application"); hWnd1 = (int)p[0].MainWindowHandle; ShowWindow((int)hWnd1, SW_HIDE); //This one works fine and always hides app's tray icon SOK = (uint)SendMessage(hWnd, TB_DELETEBUTTON, new IntPtr(item2), IntPtr.Zero); if (SOK != 1) throw new ApplicationException("TB_DELETEBUTTON failed"); removedCount++; }
-
Is there any need of Win Form in your application ? You can Create windows Services. You can Create Two Applications one will call another. and you can use windows Handles to Hide your Window
What I need to make is a stealth interface to another application. My application should run and always check to be sure that the second application is always hidden (Fron both Taskbar and TrayIcon)