How to close Start Menu with custom shortcut that launches in the background

女生的网名这么多〃 提交于 2019-12-11 14:31:44

问题


I have a custom shortcut filetype registered that defines custom verbs and handles them by implementing IContextMenu. Thus, when you click on one of these shortcuts in the Start Menu, all of the processing of that click gets routed to my IContextMenu implementation (with the default verb). The implementation launches a trampoline process, which identifies what action should be taken and then launches the actual application the user wants.

What I am finding is that the Start Menu does not close when the shortcut is clicked on. The process that gets ultimately launched shows its window and begins processing, but the Start Menu is still open and the shortcut can be clicked on a second time, and other shortcuts can be clicked on.

How can I programmatically tell the Start Menu, "Your job is done, the user did in fact make a selection, you can close now"?

来源:https://stackoverflow.com/questions/59050061/how-to-close-start-menu-with-custom-shortcut-that-launches-in-the-background

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