How can I get those coordinates of Application Icon which is find in the Window taskbar’s status area (a.k.a. System Tray) in C#?
Share
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.
You cannot do this by fair means. No such API exists. There are, of course, various hacky ways to find it out, but I won’t get into that.
Normally what you want to do is show a menu in response to a click on the tray icon. The message that Windows sends you when this happens contains the cursor coordinates where the click occurred. That’s usually enough information to show whatever it is you show in response to the click.
In C# this translates to reading the coordinates out of the
MouseEventArgsinNotifyIcon.MouseUp.