The problem appears to be that Delphi implicitly insists that the .dfm file
have the same name.  What does work at the compile level is to use:

{$IFDEF LARGE_SCREEN}
{$R PlotScreenBIG.dfm}
{$ELSE}
{$R PlotScreenSMALL.dfm}
{$ENDIF}

But then Delphi doesn't know how to load the form for editing.  Probably
because it doesn't parse the file looking for the *.dfm name and just
assumes it's the same.

Same name and different path means I still end up with two .pas files which
is what I don't want.

I'll probably just have to initialize every single width, height, top and
left for each object based on the values in the .dfm text file.  Or write a
parser that creates the init code from the two separate .dfm files.

John Dammeyer


> Just a thought...
> 
> Or maybe with the same name and a different path.
> 
> 2 cents 
> 
> 
> What I'd like to be able to do is have PlotScreen.frm become
> PlotScreenBIG.dfm and PlotScreenSMALL.dfm but keep the 
> PlotScreen.pas file
> name.  Is there a way to convince Delpi 5 to use a .dfm file 
> different from
> the name of the unit during compilation.  Then I could just...
> 
> {$IFDEF LARGE_SCREEN}
> ...  Somehow use PlotScreenBIG.dfm
> {$ELSE}
> ...  Somehow use PlotScreenSMALL.dfm
> {$ENDIF}

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to