jak zadeklarować procedure moja1 zeby mogla byc uruchomiona z procedury procedure TForm2.Button1Click(Sender: TObject);
??
wiem ze to moze byc banalne dla niekórych ale siedze nad tym ze godznie i nie wiem co zrobic . I jak zeby byla zadeklarowana zeby mozna bylo uruchomic ja z nastepnej formatki czyli nastepnego unita
unit2
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm2 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
//
{$R *.dfm}
procedure TForm2.Button1Click(Sender: TObject);
begin
moja1;
end;
procedure moja1;
begin
end;
end.
unit Unit3;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,unit2, StdCtrls;
type
TForm3 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form3: TForm3;
implementation
{$R *.dfm}
procedure TForm3.Button1Click(Sender: TObject);
begin
moja1;
end;
end.
:)