This is a question about what happens in what order as an app starts up.
Today I had occasion to try something that’s slated for release in 2020r1. To make it work as I wanted, involved adding an “initialising” flag for a control, that would act as an interlock so that event handlers that kick off as the control initialises can be prevented from doing their stuff until the control’s Open event has completed. The idea was to set this initialising flag to True and then, the control’s Open event would set it to False once it had completed.
If I were instantiating a subclassed control in code, then I could hope to do that initialisation in the Constructor rather than in the Open event handler, but how do I do this with a control I’ve just dragged from the Library and dumped in the window? The Open event for a Control seems to run much too late.
Next I put the setting of this flag (to True) in the app.Open event. But even there, event handlers for the control were running before app.Open had a chance to set the flag.
In the end I just reversed the sense of the flag, since its default value would be False anyway. All then went according to plan.
I sort of feel I’m missing a trick here somewhere in regard to initialising a control.