How to handle Window Context Menu events ?
-
Hello! I have wrote a code in which i m trying to hide the Notification icon when i click on the context menu (which pops on that icon). BUt in this manner two events fire. One which is my event written in the code(which works according to my requirement) and other is the Windows own event, which is Taskbar Popup menu. which always seems bad. if i call any messagebox after that fired events, the windows event hide but i don't want to show message box. Please help me.
-
Hello! I have wrote a code in which i m trying to hide the Notification icon when i click on the context menu (which pops on that icon). BUt in this manner two events fire. One which is my event written in the code(which works according to my requirement) and other is the Windows own event, which is Taskbar Popup menu. which always seems bad. if i call any messagebox after that fired events, the windows event hide but i don't want to show message box. Please help me.
Hi, Sorry to disappoint you, but i wanted to ask my own question in this. Are you able to detect when the user is clicking on the window in the taskbar? Actually, i have made a program in which i have made the FormBorderStyle as None. This prevents the system menu to appear when i click on the window in the taskbar. So, i wanted to figure out a way in which i could detect a click on the taskbar window and display the menu manually. Please let me know, if you happen to know about this. Thanks in advance. *** Who said nothing is impossible? I have been doing it for a long time ***
-
Hi, Sorry to disappoint you, but i wanted to ask my own question in this. Are you able to detect when the user is clicking on the window in the taskbar? Actually, i have made a program in which i have made the FormBorderStyle as None. This prevents the system menu to appear when i click on the window in the taskbar. So, i wanted to figure out a way in which i could detect a click on the taskbar window and display the menu manually. Please let me know, if you happen to know about this. Thanks in advance. *** Who said nothing is impossible? I have been doing it for a long time ***
-
Hello! I have wrote a code in which i m trying to hide the Notification icon when i click on the context menu (which pops on that icon). BUt in this manner two events fire. One which is my event written in the code(which works according to my requirement) and other is the Windows own event, which is Taskbar Popup menu. which always seems bad. if i call any messagebox after that fired events, the windows event hide but i don't want to show message box. Please help me.
I think, i am getting your problem. See, when you pop-up the message box, the event is still being fired and it still shows the taskbar menu too, but the message box removes the focus and hence makes the taskbar menu disappear. Secondly, the fact that the taskbar menu is appearing shows that you are able to hide the icon successfully, but somehow another event is being generated which is being sent again. I am not sure about how this is happening, but i guess, you can refer to this article[^] for more details. Also, i hope, you are using the NotifyIcon control. It saves a lot of time. I hope this helps. *** Who said nothing is impossible? I have been doing it for a long time ***