begin
MiPageControl := TPageControl.Create(Self);
MiPageControl.Parent := Self;
MiPageControl.Align:= AlClient;
DBGDatos:= TDBGrid.Create(self);
DBGDatos1:= TDBGrid.Create(self);
Hoja1:= TTabSheet.Create(MiPageControl);
Hoja2:= TTabSheet.Create(MiPageControl);
with Hoja1 do
begin
PageControl := MiPageControl;
DBGDatos.Parent := Hoja1;
DBGDatos.Top:= 60;
DBGDatos.Width:= 600;
DBGDatos.DataSource:= self.DataSource1;
self.ADODataSet1.Active:= true;
end;
with Hoja2 do
begin
PageControl := MiPageControl;
DBGDatos1.Parent := Hoja2;
DBGDatos1.Top:= 60;
DBGDatos1.Width:= 600;
DBGDatos1.DataSource:= self.DataSource1;
self.ADODataSet1.Active:= true;
end;
MiPageControl.ActivePage:= Hoja1;
MiPageControl.ActivePage:= Hoja2;
end;