Добавил:
bagiwow
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm2 = class(TForm)
Edit1: TEdit;
Button1: TButton;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
uses Unit3;
procedure TForm2.Button1Click(Sender: TObject);
begin
if Edit1.Text=''
then
ShowMessage('Введите имя')
else
begin
Unit3.currPlayer.Name:=Edit1.Text;
Application.CreateForm(Tform3,Form3);
Form2.Visible:=false;
form2.Destroy;
end;
end;
procedure TForm2.FormCreate(Sender: TObject);
begin
Form2.Visible:=true;
Edit1.SetFocus;
end;
end.
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm2 = class(TForm)
Edit1: TEdit;
Button1: TButton;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
uses Unit3;
procedure TForm2.Button1Click(Sender: TObject);
begin
if Edit1.Text=''
then
ShowMessage('Введите имя')
else
begin
Unit3.currPlayer.Name:=Edit1.Text;
Application.CreateForm(Tform3,Form3);
Form2.Visible:=false;
form2.Destroy;
end;
end;
procedure TForm2.FormCreate(Sender: TObject);
begin
Form2.Visible:=true;
Edit1.SetFocus;
end;
end.
Соседние файлы в папке Виселица