Why don't you inherit from this form and then have two pas files one for big and one for small and then have a ifdef for those two
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of zayin Sent: 23 February 2006 03:44 PM To: 'Borland's Delphi Discussion List' Subject: RE: Using alternate forms with units. I meant just two paths for the DFM not the pas file. {$IFDEF LARGE_SCREEN} {$R ..\big\PlotScreenBIG.dfm} {$ELSE} {$R ..\small\PlotScreenBIG.dfm} {$ENDIF} -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Dammeyer Sent: Thursday, February 23, 2006 1:24 AM To: 'Borland's Delphi Discussion List' Subject: RE: Using alternate forms with units. 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 _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

