Unter D2010 geht sogar das!
Delphi-Quellcode:
uses
TypInfo,
RTTI;
procedure ListAllFormClasses(Target: TStrings);
var
aClass: TClass;
context: TRttiContext;
types: TArray<TRttiType>;
aType: TRttiType;
begin
context := TRttiContext.Create;
types := context.GetTypes;
for aType
in types
do begin
if aType.TypeKind = tkClass
then begin
aClass := aType.AsInstance.MetaclassType;
if (aClass <> TForm)
and aClass.InheritsFrom(TForm)
then begin
Target.Add(aClass.ClassName);
end;
end;
end;
end;