On Mon, 26 Nov 2007 12:05:27 -0600
"Marco Alvarado" <[EMAIL PROTECTED]> wrote:

> Oh, forgot to tell, this part:
> 
> > ...
> > begin
> >   Application.Initialize;
> >   Application.Run;
> > end.
> 
> is inside an unit's initilization section. So the main program still
> runs, creating the form. :D

The 'begin..end.' of the program is executed after all initialization
sections. This means Application.Initialize is called after the
below code (AForm.Show).
Under Lazarus the Application.Initialize inits the widgetset.

 
> 2007/11/26, Vincent Snijders <[EMAIL PROTECTED]>:
> > Marco Alvarado schreef:
> > > I need to create my forms dynamically. In Delphi I just remove the
> > > designed form from the main program, so it looks like this:
> > >
> > > ...
> > > begin
> > >   Application.Initialize;
> > >   Application.Run;
> > > end.
> > >
> > > Later on, I just create new instances of my forms and assign it's
> > > properties, i.e.:
> > >
> > > ...
> > >   AForm := TMyForm.Create(Application);
> > >   AForm.Caption := 'This is my form';
> > >   AForm.Left := X;
> > >   AForm.Top := Y;
> > >   AForm.Width := Width;
> > >   AForm.Height := Height;
> > >   AForm.Show;
> > > ...
> > >
> >
> > How is this code entered? I cannot imagine Application.Initialize or
> > Application.Run; do that.


Mattias

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

Reply via email to