티스토리 뷰

Programming/Delphi

Delphi - IniFile

파란크리스마스 2009. 11. 22. 01:50
728x90

참조
http://delphigeist.blogspot.com/2009/11/saveload-controls-from-inifile-using.html

uses
  inifiles;

procedure TForm1.FormCreate(Sender: TObject);
var
  IniFile  : TiniFile;
begin
  //
  IniFile  := TiniFile.Create(ChangeFileExt(Application.ExeName,'.ini'));
  try
    isDEBUG := IniFile.ReadBool('INFO', 'DEBUG', false);
  finally
    IniFile.Free;
  end;
end;

procedure TForm1.FormDestroy(Sender: TObject);
var
  IniFile  : TiniFile;
begin
  //
  IniFile  := TiniFile.Create(ChangeFileExt(Application.ExeName,'.ini'));
  try
    IniFile.WriteBool('INFO', 'DEBUG', isDEBUG);
  finally
    IniFile.Free;
  end;
end;

댓글
300x250
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/03   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함