F
facat
Unregistered / Unconfirmed
GUEST, unregistred user!
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
procedure newform.myclick(Sender: TObject);
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
newform:tform;
bt:tbutton;
begin
newform:=tform.Create(form1);
bt:=tbutton.Create(newform);
with bt do
begin
parent:=newform;
caption:='sdfs';
end;
newform.ShowModal;
end;
procedure tnewform.myclick(Sender: TObject);
begin
showmessage('sdfs');
end;
end.
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
procedure newform.myclick(Sender: TObject);
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
newform:tform;
bt:tbutton;
begin
newform:=tform.Create(form1);
bt:=tbutton.Create(newform);
with bt do
begin
parent:=newform;
caption:='sdfs';
end;
newform.ShowModal;
end;
procedure tnewform.myclick(Sender: TObject);
begin
showmessage('sdfs');
end;
end.