Ver Mensaje Individual
  #6  
Antiguo 13-07-2018
Avatar de movorack
[movorack] movorack is offline
Miguel A. Valero
 
Registrado: feb 2007
Ubicación: Bogotá - Colombia
Posts: 1.346
Reputación: 20
movorack Va camino a la famamovorack Va camino a la fama
Puedes usar reintroduce

Código Delphi [-]
unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, IniFiles;

type
  TMyIniFile = class(TIniFile)
  private
  public
    constructor Create(const FileName: string); reintroduce;
  end;

  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  private
    FConfig: TMyIniFile;
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

{ TMyIniFile }

constructor TMyIniFile.Create(const FileName: string);
begin
  inherited Create(FileName);

   // esto es solo en pruebas y es para mostrar si pasa por aqui
  MessageDlg('TMyIniFile.create', mtInformation, [mbOK], 0);  
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  FConfig := TMyIniFile.Create(ChangeFileExt(ParamStr(0), '.ini'));
end;

end.



__________________
Buena caza y buen remar... http://mivaler.blogspot.com
Responder Con Cita