|
couldnt you just show/hide depending on the switch?
There must be away around this - but having a
quick hack, I can't see it (not that I have spent any real time
looking)
Another option:
Create the MainForm - as per normal
project
In the OnCreate for the MainForm, Dynamically
Create the desired Frame inside the Form.
Regards Paul McKenzie Analyst Programmer SMSS
Ltd.
----- Original Message -----
Sent: Friday, January 23, 2004 12:35
PM
Subject: [DUG] load a different
mainform at startup
Hi
Via a command-line switch, I want to display a
different form when the program starts, rather than the mainform. I've
tried hiding the mainform and showing the other form in the OnShow method of
the mainform but it doesn't allow this. Visible can't be altered in an
OnShow. I tried editing the DPR to create the first form in a
different order as follows but this crashes Delphi 5 and I can't even load
it. I had to alter it back in Notepad.
if
FindCmdLineSwitch('e',['-','/'],True) then
Application.CreateForm(TEditMain, EditMain) else
Application.CreateForm(TMainForm, MainForm);
Any other suggestions?
_______________________________________________ Delphi mailing
list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi
______________________________________________________
The contents of this e-mail are privileged and/or confidential to the
named recipient and are not to be used by any other person and/or
organisation. If you have received this e-mail in error, please notify
the sender and delete all material pertaining to this e-mail.
______________________________________________________
|
_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi