Top.Mail.Ru
Ответы

При нажатии на кнопку показать тест вылазит ошибка, код вроде правильный

При нажатии на кнопку показать тест вылазит ошибка, код вроде правильный
Вот код:
procedure TForm2.Button2Click(Sender: TObject);
begin
Form1.Show;
end;
Вот такая ошибка!

По дате
По рейтингу
Аватар пользователя
Знаток
10лет

кусок этого кода не чего не скажет

Аватар пользователя
Ученик
10лет

Код с 2 формы:
unit Unit2;

interface

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

type
TForm2 = class(TForm)
Edit1: TEdit;
Label1: TLabel;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form2: TForm2;

implementation

uses Unit1;

{$R *.dfm}

procedure TForm2.Button1Click(Sender: TObject);
begin
Form1.Caption := Form2.Edit1.Text;
end;

procedure TForm2.Button2Click(Sender: TObject);
begin
Form1.Show;
end;

end.

код с 1 формы:

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants,



Видео по теме