I am using Delphi XE3. Now I need to pop-up a dialog AFTER the main form is shown.
I try to put the codes in FormShow event handler of the main form, as follows:
with TMyChildForm.Create(Self) do begin ShowModal(); Free; end;
However, this will cause the ChildForm to be pop-up BEFORE the main form is shown.
You need to delay showing the popup form until AFTER
OnShow has exited. You can either:
- use a short timer.
PostMessage()a custom window message to yourself.
TThread.ForceQueue()(10.2 Tokyo and later only).