Forum: Algorithmen, Datenstrukturen und Klassendesign
Delphi
by Delphi.Narium,
14. Feb 2021
Ups, da hab' ich schon wieder meinen typischen / tückischen Schreib(Verwechslungs)fehler von FindControl und FindComponent gemacht :oops::cry:
procedure ShowForm(NameDesFormulars : String);
var
f : TComponent;
begin
f := FindComponent(NameDesFormulars);
// oder
f := FindGlobalComponent(NameDesFormulars);
if Assigned(f) then if f is TForm then TForm(f).Show;
end;
Forum: Algorithmen, Datenstrukturen und Klassendesign
Delphi
by Delphi.Narium,
14. Feb 2021
Du weißt also, wie das Formular heißt, dann kannst Du es über den Namen suchen:
Mal als Idee hingedaddelt:
procedure ShowForm(NameDesFormulars : String);
var
f : TWinControl;
begin
f := FindControl(NameDesFormulars);
if Assigned(f) then if f is TForm then TForm(f).Show;
end;