Päälomake type TForm1 = class(TForm) procedure FormClose(Sender: TObject; var Action: TCloseAction); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.DFM} procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); var Inis: TINIFile; begin //Nollaus: Inis:=TINIFile.Create(ExtractFilePath(Application.Exename) + '/critialmessage.ini'); Inis.WriteBool('Critial Messages - Login', 'Login Fail', False); end; Ilmoitus: unit Unit33; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, INIFiles; type TForm33 = class(TForm) Label1: TLabel; Button1: TButton; procedure FormActivate(Sender: TObject); procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form33: TForm33; implementation {$R *.DFM} procedure TForm33.FormActivate(Sender: TObject); var Inis: TINIFile; begin Inis:=TINIFile.Create(ExtractFilePath(Application.Exename) + '/critialmessage.ini'); if Inis.ReadBool('Critial Messages - Login', 'Login Fail', False) = True then Label1.Caption:='Tila: VAROITUS! Murto on tullut' else Label1.Caption:='Tila: Ei yritetty murtaa' end; procedure TForm33.Button1Click(Sender: TObject); begin Close end; end. Login: unit Unit14; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, INIFiles, ExtCtrls; type TForm14 = class(TForm) Button1: TButton; Edit1: TEdit; Button2: TButton; Label1: TLabel; Image1: TImage; procedure Button2Click(Sender: TObject); procedure Button1Click(Sender: TObject); procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); procedure FormCreate(Sender: TObject); procedure FormShow(Sender: TObject); procedure Dislabed; private public { Public declarations } end; var Form14: TForm14; Ini: TINIFile; Clos: Boolean; Trys: Integer; implementation uses Unit1, Unit10; {$R *.DFM} procedure TForm14.Button2Click(Sender: TObject); begin Application.Terminate end; procedure TForm14.Button1Click(Sender: TObject); begin Ini:=TINIFile.Create(ExtractFilePath(Application.Exename) + '/sercrytion.ini'); if Edit1.Text = Ini.ReadString('exe', 'Paasword', Edit1.Text) then begin Clos:=True; Pasas.AllowCloseTimer; Close; end else begin if Edit1.Text = 'Guest' then begin Clos:=True; Form1.Guest; Close; end else MessageBox(0, 'Väärä salasana, Yritä uudelleen', 'TextPro Error', 16); Trys:=Trys + 1; if Trys = 3 then begin Dislabed; Label1.Left:=Label1.Left - 30 end; end; end; procedure TForm14.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin CanClose:=Clos end; procedure TForm14.FormCreate(Sender: TObject); begin Clos:=False; Trys:=0; end; procedure TForm14.Dislabed; var Inis: TINIFile; begin Button1.Visible:=False; Label1.Caption:='Väärät salasanat. Yritä uudelleen myöhemmin'; Edit1.Visible:=False; Button2.Left:=Button2.Left - 70; Inis:=TINIFile.Create(ExtractFilePath(Application.Exename) + '/critialmessage.ini'); Inis.WriteBool('Critial Messages - Login', 'Login Fail', True); end; end.