Ver Mensaje Individual
  #2  
Antiguo 29-12-2012
_CALI _CALI is offline
Miembro
 
Registrado: mar 2008
Posts: 99
Reputación: 17
_CALI Va por buen camino
Código Delphi [-]
const WM_LOADED = WM_USER + 200;
type
  TGround = class(TFrame)
    Button1: TButton;
    PageControl1: TPageControl;
    TabSheet1: TTabSheet;
    TabSheet2: TTabSheet;
  private
    { Private declarations }
     procedure WMCreate(var Msg: TWMCreate); message WM_CREATE;
     procedure WMLoaded(var Msg: TMessage); message WM_LOADED;
  public
    { Public declarations }
  end;
implementation
{$R *.dfm}
procedure TGround.WMCreate(var Msg: TWMCreate);
begin
  inherited;
  PostMessage(Handle, WM_LOADED, 0,0);
end;

procedure TGround.WMLoaded(var Msg: TMessage);
begin
   Windows.SetParent(Handle, Application.MainForm.ClientHandle);
end;
end.

bueno asi no me da error, supongo que al llamar a la funcion setParent, este todavia no reconoce al pagecontrol o algo asi, enviando un mensaje al final de la cola puedo recien insertar el Frame correctamente, pero , una solicion mas "elagante" please
gracias!!

Última edición por _CALI fecha: 29-12-2012 a las 23:52:48.
Responder Con Cita