Показать сообщение отдельно
  #33  
Старый 25.02.2015, 23:10
Аватар для roland196
roland196 roland196 вне форума
Прохожий
 
Регистрация: 24.02.2015
Адрес: Литва
Сообщения: 22
Версия Delphi: Turbo Delphi 10
Репутация: 10
По умолчанию

вот коды моих форм:
но они идентичны синтаксически с кодами из вашего исходника.

мои вот:

Код:
unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    Label1: TLabel;
    SpeedButton1: TSpeedButton;
    procedure SpeedButton1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation
uses Unit2;

{$R *.dfm}

procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
Hide;
  Form2.N2 := 196;
  Form2.Show;
end;

end.

Код:
unit Unit2;

interface

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

type
  TForm2 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
    procedure FormShow(Sender: TObject);


  private
    { Private declarations }
  public
    { Public declarations }
    N2 : Integer;

  end;

var
  Form2: TForm2;

implementation

uses
  Unit1;

{$R *.dfm}

procedure TForm2.FormShow(Sender: TObject);
begin
  Label2.Caption := IntToStr(N2);
end;

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

end.

просто может надо не только код записать но и произвести какие то операции в свойствах форм и кнопок?
__________________
не переставай удивляться обычному
Ответить с цитированием