Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #5  
Antiguo 14-12-2009
camariere camariere is offline
Miembro
 
Registrado: abr 2008
Posts: 37
Poder: 0
camariere Va por buen camino
Yo creo que el problema está en esta variable....

Código Delphi [-]
    vBotonOnClick   : TNotifyEvent;

¿No debería estar declarado como un procedimiento?

Código Delphi [-]

type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
    procedure vBotonOnClick(Sender: TObject); //Aquí se declara el evento
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  Boton: Tbutton;

implementation

{$R *.DFM}

procedure TForm1.vBotonOnClick(Sender: TObject);
var
  Texto: string;
begin
  texto := (Sender as TButton).caption;
  ShowMessage('Botón <'+texto+'> presionado');
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Boton := TButton.create(Form1);
  Boton.Parent := Form1;
  Boton.Caption := 'Hola';
  Boton.Height := 120;
  Boton.Left := 20;
  Boton.Width := 130;
  Boton.Enabled := True;
  Boton.visible := True;
  Boton.OnClick := vBotonOnClick; //se asigna el evento
end;
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Privileged Instruction ajgomezlopez Lazarus, FreePascal, Kylix, etc. 4 22-03-2009 14:30:27
Privileged instruction luis1980 C++ Builder 3 29-08-2008 08:02:13
QReport. Error "Privileged instruction" adebonis Impresión 0 11-12-2004 07:34:42
Rave -- Privileged Instruction altp Impresión 0 19-07-2004 18:33:12
privileged instruction Juan C Robles Varios 1 31-10-2003 03:14:45


La franja horaria es GMT +2. Ahora son las 20:41:28.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi