procedure Tfrm_verificar.bnt_verificarClick(Sender: TObject); var a, b: integer; compa, compb: TComponent; iguais: TStringList; s: string; begin iguais := TStringList.Create; iguais.Sorted := True; s := ''; for a := 0 to ComponentCount-1 do begin compa := Components[a]; for b := 0 to ComponentCount-1 do begin compb := Components[b]; if (compa is TEdit) and (compb is TEdit) and (compa <> compb) and (TEdit(compa).Text = TEdit(compb).Text) and ((iguais.IndexOf(compa.Name) < 0) or (iguais.IndexOf(compb.Name) < 0)) then begin if s <> '' then s := s + '; '; pnl_aviso.Visible := true; end; end; end; end;
Codigo fonte: http://www.2shared.c...ica_campos.html