unit Unit7;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm7 = class(TForm)
    Label1: TLabel;
    Edit1: TEdit;
    Label2: TLabel;
    Edit2: TEdit;
    Label3: TLabel;
    Button1: TButton;
    procedure Edit1Change(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form7: TForm7;

implementation

uses Unit1, Unit2;

{$R *.dfm}

procedure TForm7.Edit1Change(Sender: TObject);
begin
if Form7.Edit1.Text='' then
begin
Form7.Button1.Enabled:=false;
Form7.Label3.Enabled:=false;
Form7.Edit2.Enabled:=false;
end
else
begin
Form7.Button1.Enabled:=true;
Form7.Label3.Enabled:=true;
Form7.Edit2.Enabled:=true;
end;
end;

procedure TForm7.Button1Click(Sender: TObject);
begin
Form7.Hide;
Form2.Show;
end;

procedure TForm7.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Form1.Close;
application.Terminate;
end;

end.
