How to Detect Right Click on the Taskbar

情到浓时终转凉″ 提交于 2019-12-13 16:32:03

问题


I've got a Windows Forms application in C# that starts off with a loading dialog. As expected, a button for the app shows up in the Windows taskbar.

I would like to detect right-clicks that might be done to that button.

Ultimately, I hope to disable the right-click or simply have the loading dialog regain focus. I've seen that some people use custom libraries and packages (interop, for example) to achieve some Win32 functionality, but I'd personally like to avoid this. Is it impossible to do without such libraries/packages?


回答1:


How about just not showing the form in the taskbar by setting Form.ShowInTaskbar to false?



来源:https://stackoverflow.com/questions/2564790/how-to-detect-right-click-on-the-taskbar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!