In our system we have a mainmenu app and many modular executables coming from it. The entire system is very large and changes regularly so it is easiest to develop it in this way.
The modular apps are run from the mainmenu by clicking on a dbgrid. If the user clicks twice (by accident) the first click runs the app and the second gives focus back to the mainmenu app.
When the modular app loads it loads in front because its form is set to fsstayontop (the app must run on top) but does not have focus.
When a modular app exits it sends a message to the main menu telling it to activate itself.
How can I make the mainmenu not receive any more mouse clicks or keyboard inputs or anything that would make it active again after they have chosen to run a program from it?
Best case scenario would be to have a flag set when a program is run so that the mainmenu app won't become active but I have not been successful in implementing this or overriding the appropriate messages.
Even on assigning a message handler to an application and setting handled to true for every message it overrides every message EXCEPT when the app is not active and you click on it, it does become active???
This has been the thorn in my side for about 2 years now and remains the only system issue. Please help :)