Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Trucos (https://www.clubdelphi.com/foros/forumdisplay.php?f=52)
-   -   Este truco sirve para cualquier tipo de formularios (MDI, SDI) (https://www.clubdelphi.com/foros/showthread.php?t=80490)

marcoszorrilla 29-06-2006 23:25:16

Este truco sirve para cualquier tipo de formularios (MDI, SDI)
 
Código Delphi [-]
function TFormPpal.IsLoaded(Nombre: string): Boolean;
var b: boolean;
    i: integer;
begin
b := false;
for i := 0 to Screen.FormCount - 1 do
    if Screen.Forms[i].Name = Nombre then
       b := true;
IsLoaded := B;
end;

Nota: El código anterior es mejorable mediante un bucle while (nunca repeat)


La franja horaria es GMT +2. Ahora son las 11:48:53.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi