Ver Mensaje Individual
  #4  
Antiguo 15-08-2007
Avatar de ArdiIIa
[ArdiIIa] ArdiIIa is offline
Miembro Premium
 
Registrado: nov 2003
Ubicación: Valencia city
Posts: 1.481
Reputación: 24
ArdiIIa Va por buen camino
Hola cecilio
A ver si probando esto aclaramos algo...

Código Delphi [-]
unit Unit1;

interface


uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

 const ne = 20;

type
   Tsql= Class(TObject)
       private
         cm: array[0..ne] of string;
         vl: array[0..ne] of string;
         tabla: string;
      public
        constructor create ;
        destructor Destroy ; override;
        procedure Limpia;
  end;


Type

  TForm1 = class(TForm)
    Button1: TButton;
    Memo1: TMemo;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;



var
  Form1: TForm1;

implementation

{$R *.dfm}


constructor  Tsql.create;
begin
 inherited Create;
End;

destructor Tsql.Destroy;
Begin
inherited Destroy;
End;


procedure TSql.Limpia;
Var I : Integer;
Begin
   For I  := Low(cm) to High(cm) do
   cm[i] := 'ClubDelphi ' + IntToStr(I);
End;




procedure TForm1.Button1Click(Sender: TObject);
Var
Objeto : TSql;
I  : Integer;
begin

Memo1.Lines.Clear;

Objeto := TSql.create;
With Objeto DO
  Begin
      Limpia;
      For I := Low(cm) to High(cm) do
        Memo1.Lines.Add(cm[i]);
  End;


  Objeto.Free;

end;

end.



Código:
object Form1: TForm1
  Left = 436
  Top = 248
  Width = 273
  Height = 308
  Caption = 'Form1'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object Button1: TButton
    Left = 168
    Top = 216
    Width = 75
    Height = 25
    Caption = 'Button1'
    TabOrder = 0
    OnClick = Button1Click
  end
  object Memo1: TMemo
    Left = 32
    Top = 32
    Width = 209
    Height = 153
    Lines.Strings = (
      'Memo1')
    TabOrder = 1
  end
end

Saludos y suerte
__________________
Un poco de tu generosidad puede salvar la vida a un niño. ASÍ DE SENCILLO

Última edición por ArdiIIa fecha: 15-08-2007 a las 14:48:46.
Responder Con Cita