unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, inifiles;
procedure WriteIni;
type
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1 : TForm;
IniPath: string;
implementation
{$R *.dfm}
procedure WriteIni;
var MyIni:TIniFile;
begin
MyIni:=TIniFile.Create(IniPath);
MyIni.WriteBool('sound','cbSound',Form1.cbSound.Checked);
MyIni.WriteBool('Title','timer', Form1.cbTimer.Checked);
MyIni.Free;
Form1.Close
end;
в другом модуле:
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, Unit1;