Réponse acceptée !
Delphi 2005 : RTLVersion = 17.0 // Def VER170
Delphi 5 : RTLVersion = 13.0 // Def VER130
unit Unit1;
interface
{$IF RTLVersion >= 18.0}
{$DEFINE DELPHICODE2} // TurboDelphi, Delphi 2006, 2007
{$ELSEIF RTLVersion >= 14.0}
{$DEFINE DELPHICODE1} // Delphi 6, 7, 8, 2005
{$ELSEIF RTLVersion >= 10.0}
{$DEFINE DELPHICODE0} // Delphi 3, 4, 5
{$IFEND}
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
{$IFDEF DELPHICODE2}
const DelphiCode = 2;
{$ELSE}
{$IFDEF DELPHICODE1}
const DelphiCode = 1;
{$ELSE}
const DelphiCode = 0;
{$ENDIF}
{$ENDIF}
type
TForm1 = class(TForm)
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
end.