I’ve always been curious to see if I can show, hide or change a NotifyIcon created by another application via a C# application.
Could someone please post an example on how to do this? 🙂
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To modify icons in the systray, you can use Shell_NotifyIcon Win32 API (P/Invoke declaration). The icons are associated with a window handle and an id. That means that to modify or hide another program’s icon, you need to know the window and the id used by that application to register it. You might be able to brute force it by enumerating all windows for that process and making calls with each handle and each number between 0 and 5000 thousands for example, but your chances of success are very slim.