OnCreate to early

11 views
Skip to first unread message

Rzulty

unread,
Sep 8, 2006, 4:51:31 PM9/8/06
to
Hi,

I would like something to be done after Form and all of its components
are created. Form.OnCreate doesn't work every time since it may be
raised before components are constructed so one can't get to theirs
properties. How can I do it to bypass that problem?


Sabrina

unread,
Sep 11, 2006, 6:43:18 AM9/11/06
to

OnShow or OnActivate event?

Sabrina

unread,
Sep 11, 2006, 6:43:36 AM9/11/06
to

OnShow or OnActivate event?

Riki Wiki

unread,
Sep 17, 2006, 7:26:18 AM9/17/06
to
Hoi

You need to repost your question on the Borland news server to make
everybody see it and possibly answer your question. Further, this news
group do not officially exist, the group to use is
b.p.d.vcl.components.using.win32.

How to post to Delphi newsgroups:
<http://delphi.wikia.com/wiki/Delphi_Newsgroups>

dah...@gmail.com

unread,
Sep 27, 2012, 1:34:08 AM9/27/12
to
Hello.
In a project with MDIChilds i show the forms before any code i want like this...

Application.Initialize;
Application.CreateForm(TForm1, Form1);
//Application.CreateForm(TForm2, Form2);
Application.Run;

them from form1 call the form:

procedure TForm1.Button1Click(Sender: TObject);
begin
Application.CreateForm(TForm2, Form2);
end;

On Form2 Create:

procedure TForm2.FormCreate(Sender: TObject);
begin
// some code...
Show;
end;

///--------- Or try with a Data Module and call the forms...
Application.Initialize;
//Application.CreateForm(TForm1, Form1);
//Application.CreateForm(TForm2, Form2);
Application.CreateForm(TDataModule3, DataModule3);
Application.Run;

Good look....
Reply all
Reply to author
Forward
0 new messages