Einzelnen Beitrag anzeigen

davtix

Registriert seit: 29. Mai 2003
Ort: Berlin
87 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#3

AW: Unterschiedliche Units für Debug und Release

  Alt 31. Okt 2021, 12:47
ging ja schnell

Hab n bissel rumgewürgt aber es scheinbar so hier hinbekommen.


Delphi-Quellcode:
  uses .. ..JvExExtCtrls, JvExtComponent, JvCaptionPanel,

    //unterschiedliche pas dateien im Debugmodus / releaseModus
   Release_codes {$IFDEF DEBUG} , Debug_codes {$ELSE}   {$ENDIF} ;
Delphi-Quellcode:
unit Release_codes;

interface


   function release_debug:string;


implementation


function release_debug:string;
begin

  result := 'kommt von a release unit'
end;

end.
Delphi-Quellcode:
unit Debug_codes;

interface

   function release_debug:string;


implementation


function release_debug:string;
begin

  result := 'kommt von a debug unit'
end;

end.

in der unit1 beim start dann ...
Delphi-Quellcode:
  //Form ausrichten
      Form1.Width := GetDPI(1200);
      Form1.Height := GetDPI(800);
      Form1.Left := Screen.Width - Form1.Width;
      Form1.Top := screen.Height - (screen.Height - screen.WorkAreaHeight) - form1.Height;


  tempS := release_debug;
  form1.Caption := tempS;

  exit;
  Mit Zitat antworten Zitat