[Lazarus] Showmodal trouble
John vd Waeter
john at jvdw.nl
Thu Sep 18 14:10:50 CEST 2008
> any ideas for a fast workaround? The problem with the modal form getting lost
> behind other forms occurs most times only on the first ShowModal every
> program run.
I suppose the dialogs are not created on-the-fly...
Hmmm... the most ugly workaround I can think of:
1. Put a timer on any form that is to be shown Modal
2. Start the timer in the onshow-event IF a flag is set.
When the timer fires, close the form.
3. Call all your dialogs when the main-program starts:
with thedialog do
Should work if things happen only at the first Showmodal.
Now every form has had its first showmodal.
Speaking of workarounds.... ;-)
More information about the Lazarus