[Lazarus-es] Conocer formularios cargados

JoshyFun joshyfun en gmail.com
Mie Dic 30 20:46:52 CET 2009


Hello Ismael,

Wednesday, December 30, 2009, 8:00:50 PM, you wrote:

ILDG> JoshyFun trato de hacer:
ILDG>   for i := 0 to Screen.FormCount - 1 do begin
ILDG>     Screen.Forms[i].Free;
ILDG>   end;
ILDG> Y me da el siguiente error:

Normal, en el momento que haces el primer ".Free" el formcount ya no
vale 2, si no 1 ;)

Hazlo así:

  for i := Screen.FormCount - 1 downto 0 do begin
    Screen.Forms[i].Free;
  end;


-- 
Best regards,
 JoshyFun





More information about the Lazarus-es mailing list