Ver Mensaje Individual
  #14  
Antiguo 31-01-2012
rojo raton rojo raton is offline
Miembro
NULL
 
Registrado: oct 2011
Posts: 16
Reputación: 0
rojo raton Va por buen camino
sin embargo a mi si me funca. Mirá lo que hice:
Coloqué 2 botones comunes en un formulario vacío, cortito el programa.
Te tendría q funcionar. sino ya es otro problema.

Código Delphi [-]
var
  Form1: TForm1;
  t:tbutton;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
    t:= tbutton.Create(nil);
    t.Parent:= form1;
    t.Height:= 20;
    t.Width:= 60;
    t.Left:= 50;
    t.Top:= 50;
    t.Caption:= 'prueba';
    t.OnClick:= button2click;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
   showmessage('eureca!');
end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  t.Free;
end;

end.
Responder Con Cita