Hi Alan.
Das könnte so gehen.
(Ich habe es nicht getestet, es sollte aber funktionieren
)
Delphi-Quellcode:
var
i, CountForm1, CountForm2: Integer;
begin
CountForm1 := 0;
CountForm2 := 0;
with Screen do
for i := 0 to pred(FormCount) do
if Forms[i] is TForm1 then
inc(CountForm1)
else if Forms[i] is TForm2 then
inc(CountForm2);
lblForm1.Caption := IntToStr(CountForm1);
lblForm2.Caption := IntToStr(CountForm2);