Ver Mensaje Individual
  #28  
Antiguo 26-04-2007
Avatar de xander
xander xander is offline
Miembro
 
Registrado: jul 2006
Posts: 499
Reputación: 20
xander Va por buen camino
Cita:
Empezado por Ñuño Martínez
al reproducir un programa RAD a golpe de código. Si un programa tiene 200 componentes, lo cual es bastante común, podemos ahorrar casi 300Ko.

Eso sí, es mucho más difícil diseñar un formulario escribiendo el código directamente en Pascal que utilizando los componentes visuales.
Aver, a ver, ¿quieres decir que si creo mis componentes desde código? al estilo de:

Código Delphi [-]
var
  Form1: TForm1;
  Button1: TButton;
  JvDBGrid1: TJvDBGrid;
  Table1: TTable;
  Jv: TJvCsvDataSet;
  M: TJvMemoryData;
  JvDataSource1: TJvDataSource;

  Form1 := TForm1.Create(Self);
  Button1 := TButton.Create(Form1);
  JvDBGrid1 := TJvDBGrid.Create(Form1);
  Table1 := TTable.Create(Self);
  Jv := TJvCsvDataSet.Create(Self);
  M := TJvMemoryData.Create(Self);
  JvDataSource1 := TJvDataSource.Create(Self);
  with Form1 do
  begin
    Name := 'Form1';
    Left := 0;
    Top := 0;
    Caption := 'Form1';
    ClientHeight := 530;
    ClientWidth := 399;
    Color := clBtnFace;
    Font.Charset := DEFAULT_CHARSET;
    Font.Color := clWindowText;
    Font.Height := -11;
    Font.Name := 'Tahoma';
    Font.Style := [];
    OldCreateOrder := False;
    PixelsPerInch := 96;
  end;
  with Button1 do
  begin
    Name := 'Button1';
    Parent := Form1;
    Left := 32;
    Top := 64;
    Width := 75;
    Height := 25;
    Caption := 'Button1';
    TabOrder := 0;
    OnClick := Button1Click;
  end;
  with JvDBGrid1 do
  begin
    Name := 'JvDBGrid1';
    Parent := Form1;
    Left := 24;
    Top := 112;
    Width := 345;
    Height := 385;
    DataSource := JvDataSource1;
    TabOrder := 1;
    TitleFont.Charset := DEFAULT_CHARSET;
    TitleFont.Color := clWindowText;
    TitleFont.Height := -11;
    TitleFont.Name := 'Tahoma';
    TitleFont.Style := [];
    SelectColumnsDialogStrings.Caption := 'Select columns';
    SelectColumnsDialogStrings.OK := '&OK';
    SelectColumnsDialogStrings.NoSelectionWarning := 'At least one column must be visible!';
    EditControls := <>;
    RowsHeight := 17;
    TitleRowHeight := 17;
  end;
  with Table1 do
  begin
    Name := 'Table1';
    DatabaseName := 'DBDEMOS';
    TableName := 'customers.dbf';
    Left := 24;
    Top := 16;
  end;
  with Jv do
  begin
    Name := 'Jv';
    Changed := False;
    CsvUniqueKeys := False;
    ExtendedHeaderInfo := False;
    CaseInsensitive := False;
    LoadsFromFile := False;
    AutoBackupCount := 0;
    StoreDefs := True;
    Left := 88;
    Top := 16;
  end;
  with M do
  begin
    Name := 'M';
    FieldDefs := <>;
    Left := 160;
    Top := 16;
  end;
  with JvDataSource1 do
  begin
    Name := 'JvDataSource1';
    DataSet := Jv;
    Left := 248;
    Top := 24;
  end;

Mi programa va a medir menos que usando el editor de formularios de Delphi??? Me puedes firmar con tu sangre eso??

Y de ser así, porque es que sucede eso??? al final de cuentas eso es lo que hace el compilador de Delphi al crear el formulario, que no?
__________________
"Hey, nena, debe ser genial ser tú y verme a mí mismo..."
Responder Con Cita