Einzelnen Beitrag anzeigen

Klaus01

Registriert seit: 30. Nov 2005
Ort: München
5.757 Beiträge
 
Delphi 10.4 Sydney
 
#2

AW: Suche nach einem Formtyp in einer ObjectListe von Forms

  Alt 6. Okt 2021, 14:21
Delphi-Quellcode:
type
  TFormClass = class of TForm;


function TForm1.formExists(form: TFormClass): Boolean;
begin
 for var i := 0 to fFormList.Count - 1 do
 begin
   result := false;
   if (AFormList[i] is form) then
   begin
     result := true;
     break;
   end;
 end;
end;
vielleicht so?

Grüße
Klaus
Klaus
  Mit Zitat antworten Zitat