Is is possible to have right-mouse-click entries only appear when my application is running? What I am thinking is that I want people to be able to right-click a file in windows explorer and be able to select an entry "Email this file to technical support", but I need my app to be running in order to do that, so I want the entry to disappear when my app isn't running.
I guess the second part of my question is how to implement that function - i.e. how can I get a right-click menu entry click from Windows Explorer recognised and acted on my my app if the app is already running, or will I have to have a minion app that just passes a message to the main app?
A shell context-menu extension can decide whether to create any menu items easily enough. Change your handling of the IContextMenu.QueryContextMenu
method accordingly. (Delphi comes with a sample project for context-menu extensions. Start from there if you don't already have one.)
Another option is to keep the menu item visible all the time. If your application isn't running, then have the menu extension start your program first. Why should the user have to worry about what order to do things?