I have a form displayed in dialog mode, and in the form's Load event, under certain conditions, I immediately call another dialog form.
When I do that, the first dialog form does not display. Some parts of it do, like a combobox that is forced to DropDown, and sometimes random bits of other things, sometimes nothing, but the form does not display as a whole. The second form appears first, and only after I deal with it and close it, does the first dialog form finish displaying.
I have tried DoEvents, Form.RePaint, Form.Refresh, Sleep - nothing works.
I am thinking I may have to try setting a timer in the Load event and let the event finish, then have the timer event open the second form, if the display is somehow dependent on the Load code completing, but that seems a bit clunky.
Is there some other way to force the display to finish painting BEFORE going on to open the second form?