procedure TForm1.Button1Click(Sender: TObject); begin if (Edit1.Text = 'a') and (Edit2.Text = 'b') then Close; end;