Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #4  
Antiguo 13-01-2008
canelita canelita is offline
Miembro
 
Registrado: ago 2007
Ubicación: Cucuta
Posts: 18
Poder: 0
canelita Va por buen camino
Componente Shape con Imagen Evento y texto.

unit shape1;
interface
uses
Windows, Messages, graphics, SysUtils, Classes, Controls, ExtCtrls;
type
oNCLICKEVENTO =procedure(Sender:TObject) of object;
tshape1 = class(TShape)
private
FOnClick: oNCLICKEVENTO;
FCaption:string;
Fbitmat:tbitmap;
procedure CMMouseClick(var msg:TMessage);//; message CM_MOUSECLICK;
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
published
Property Tcaption:string read Fcaption write fcaption ;
property OnClick: oNCLICKEVENTO read FOnClick write FOnClick ;
Property bitmat:Tbitmap read fbitmat write fbitmat;
procedure LLenaimagen(x:String);

{ Published declarations }
end;
procedure Register;
implementation
unit shape1;
interface
uses
Windows, Messages, graphics, SysUtils, Classes, Controls, ExtCtrls;
type
oNCLICKEVENTO =procedure(Sender:TObject) of object;
tshape1 = class(TShape)
private
FOnClick: oNCLICKEVENTO;
FCaption:string;
Fbitmat:tbitmap;
procedure CMMouseClick(var msg:TMessage);//; message CM_MOUSECLICK;
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
published
Property Tcaption:string read Fcaption write fcaption ;
property OnClick: oNCLICKEVENTO read FOnClick write FOnClick ;
Property bitmat:Tbitmap read fbitmat write fbitmat;
procedure LLenaimagen(x:String);

{ Published declarations }
end;
procedure Register;
implementation


procedure TShape1.CMMouseClick(var Msg:TMessage);
begin
inherited;
if Assigned (FOnClick) then
FOnClick(Self);
end;
procedure TShape1.LLenaimagen(x:string);
var Bitmap: TBitmap;
begin
Bitmap := TBitmap.Create;
try
Bitmap.LoadFromFile(x);
Canvas.Brush.Bitmap := Bitmap;
Canvas.FillRect(Rect(0,0,100,200));
finally
Canvas.Brush.Bitmap := nil;
Bitmap.Free;
end;
end;

procedure Register;
begin
RegisterComponents('Additional', [tshape1]);
end;

end.
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

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
Eliminarcero a la izquierda cacu OOP 1 11-11-2007 19:50:42
José Saramago:la izquierda ha dejado de ser izquierda marcoszorrilla La Taberna 3 15-06-2007 19:02:49
El zero a la izquierda [Gunman] PHP 4 12-07-2006 08:56:38
Navegar en un DBgrid de izquierda a derecha amadis Conexión con bases de datos 1 17-01-2006 12:53:32
como pooner 0 en la izquierda Michel Firebird e Interbase 6 29-07-2003 15:09:09


La franja horaria es GMT +2. Ahora son las 23:26:03.


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