unit Jonson; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; Label5: TLabel; Button1: TButton; Button2: TButton; Label6: TLabel; Edit1: TEdit; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; koldet: integer; implementation uses Vvod; {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin if (length (Edit1.Text)=0) then ShowMessage ('Ошибка ввода данных.' +#13+'Поле "Количество элементов"' +#13+'должно быть заполнено!') else begin koldet := StrToInt(Edit1.text); Form2.Show; //переключение на вторую форму end; end; procedure TForm1.Button2Click(Sender: TObject); begin Close; end; end.