问题
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