Bartek wrote:
Mattias Gaertner wrote:

On Thu, 08 Sep 2005 11:08:54 +0200 Bartek <[EMAIL PROTECTED]> wrote:


Mattias Gaertner wrote:


On Sun, 07 Aug 2005 18:40:05 +0200 Bartek <[EMAIL PROTECTED]>
wrote:


[...]

TCustomForm.ShowModal Visible=False Enabled=True fsModal=True



You are showing the form twice. Skip the second.

Mattias



But I don't show the form twice. At least I think so. I let
Lazarus auto-create the forms.



TCustomForm.ShowModal is the only method, that sets fsModal. You
got the exception, because the fsModal was already set, so
ShowModal was called twice. You are showing the form in a timer.
Maybe the you forgot to disable the timer in OnTimer?


I did not know that I had to do this. Thanks for the help, now it
works perfect. But now I am somehow confused. I thought that the
ShowModal call stalls the execution of OnTimer. Now I am not sure how
this works. Is the OnTimer proc called in a separate thread?
Otherwise it would not be able to call ShowModal once more.

Showmodal doesn't mean that all events are blocked. It only means that
all other forms are disabled and that your code will continue after you
closed the modal form.
All messages are handled (in the showmodal message loop)

Marc

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to