procedure TForm1.Button1Click(Sender: TObject);
Var
MyINI: TINIFile; // TINIFile objektet
PathToINIFile: String;
Password_user: String;
Username_user: String;
begin
PathToINIFile := IncludeTrailingBackslash(ExtractFilePath(ParamStr(0)))+'conf.ini';
MyINI := TINIFile.Create(PathToINIFile);
Password_user := MyINI.ReadString('config', 'username', 'Ikke fundet');
Username_user := MyINI.ReadString('config', 'password', 'Ikke fundet');
if (edit_pass.Text = '') or (edit_user.Text = '') then
ShowMessage('Du mangler at udfylde Brugernavn eller Password!')
else
if (edit_pass.Text = Password_user) and (edit_user.Text = Username_user) then
Form2.Show
Form1.Close
else
ShowMessage('Forkert brugernavn/password!');
end;