Title: Message
|
Hi Stacey
Aha. Application.CreateForm needs a
semi-colon at the end otherwise it says "Call to Application.CreateForm is
missing or incorrect. So a simple begin/end
block fixes the problem and it now works.
Thanks.
----- Original Message -----
Sent: Friday, January 23, 2004 2:32
PM
Subject: [DUG] Optional Main Form
D6, New Project,
New Form, Project -> View Source and modify so it is as below and it all
seems to work fine.
program Project1;
uses Forms, Unit1 in
'Unit1.pas' {Form1}, Unit2 in 'Unit2.pas' {Form2};
{$R *.res}
begin Application.Initialize;
if ParamStr(1) = '1' then begin
Application.CreateForm(TForm1, Form1); end else
begin Application.CreateForm(TForm2, Form2);
end; Application.Run; end.
Stacey
Stacey
Verner
Ph: +64-9-4154790 Software
Developer Fax:
+64-9-4154791
DDI: +64-9-4154797 CJN Technologies Ltd.
Email: [EMAIL PROTECTED]PO
Box 302-278, North Harbour, Auckland 1330, New Zealand 12 Piermark Drive,
North Harbour, Auckland, New Zealand Visit our website at http://www.cjntech.co.nz/
Stacey
Verner
Ph: +64-9-4154790 Software
Developer Fax:
+64-9-4154791
DDI: +64-9-4154797 CJN Technologies Ltd.
Email: [EMAIL PROTECTED]PO
Box 302-278, North Harbour, Auckland 1330, New Zealand 12 Piermark Drive,
North Harbour, Auckland, New Zealand Visit our website at http://www.cjntech.co.nz/
_______________________________________________ Delphi mailing
list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi
|
_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi