Ver Mensaje Individual
  #13  
Antiguo 03-05-2011
Avatar de Thoma
Thoma Thoma is offline
Miembro
NULL
 
Registrado: abr 2011
Posts: 46
Reputación: 0
Thoma Va por buen camino
Código Delphi [-]
 
unit Rutinas;
const
    sFileDai='C:\file.INI';
  Procedure BloquearEdits (Form :TForm);
implementation
uses frAccesoDatos;
Procedure BloquearEdits (Form :TForm);
Var i :Integer;
Begin
   for i := 0 to (Form.ComponentCount - 1) do
    begin
     if (Form.Components[i]) is TEdit then
         TEdit(Form.Components[i]).Enabled := False;
     end;
end;
........................
unit FrFormulario;
type
  TFrFormulario= class(TForm)
    edtTitulo              : TEdit;
    edtValor               : TCurrencyEdit;
    lblValor               : TsLabel;
 
implementation
uses FrAccesoDatos, Rutinas;
 
procedure TFrFormulario.FormCreate(Sender: TObject);
begin
   BloquearEdits(TFrFormulario);
end;
....................

E2010 Incompatible types: 'TForm' and 'class of TFrmFormulario'

Al compilar me saca este error de incompatibilidad (algo se me escapa de las manos).


el nombre del formulario es "frmFormulario"
si pongo:
BloquearEdits(frmFormulario);

me dice el siguiente error:
E2003 Undeclared identifier: 'FrmFormulario'

Última edición por Thoma fecha: 03-05-2011 a las 20:35:43.
Responder Con Cita