Like Andrew said, you are closing the form yourself. Leave it for the
timer to do.


On 15/12/2007, el stamatakos <[EMAIL PROTECTED]> wrote:
>
> procedure TMainForm.ShowNotification(Msg:String; time:Cardinal);
> var
> MessageForm:TMessageChildForm;
> begin
> MessageForm:=TMessageChildForm.Create(Self);

I would change Self to nil.

> MessageForm.Show;

I would move Show 'till after you have set the Msg and Time.

> MessageForm.Visible:=True;

This shouldn't be needed.

> MessageForm.Close;

Remove this line and rather call Show here.  Also in the
MessageForm.OnShow, enabled the timer. Don't enable the timer in the
MessageForm.Create.

In the MessageForm.OnTimerFired event handler, disable the timer and
then call Close.


Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

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

Reply via email to