Ver Mensaje Individual
  #3  
Antiguo 13-01-2014
RedVenom RedVenom is offline
Miembro
 
Registrado: oct 2003
Ubicación: Tabasco, Mexico
Posts: 110
Reputación: 21
RedVenom Va por buen camino
Esto es lo que estoy haciendo:

Código Delphi [-]
unit UnidadPrincipal;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Rtti, System.Classes,
  System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Dialogs,
  FMX.StdCtrls, FMX.Objects, FMX.Ani;

type
  TFormPrincipal = class(TForm)
    PanelBts: TPanel;
    BtCorrespondencia: TSpeedButton;
    Label1: TLabel;
    Image1: TImage;
    Image2: TImage;
    PanelFormas: TPanel;
    procedure BtCorrespondenciaClick(Sender: TObject);
    procedure IncrustarForm(AParent:TControl; AForm:TCustomForm);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormPrincipal: TFormPrincipal;

implementation

{$R *.fmx}
Uses UnidadCorrespondencia;

procedure TFormPrincipal.BtCorrespondenciaClick(Sender: TObject);
begin
  IncrustarForm(PanelFormas, Correspondencia.Create(Self));
end;

procedure TFormPrincipal.IncrustarForm(AParent:TControl; AForm:TCustomForm);
begin
  while AForm.ChildrenCount>0 do
    AForm.Children[0].Parent:=AParent;
end;

Pero me da un error a la hora de correr el procedimiento, me pone error Access Violation.
Responder Con Cita