Delphi-PRAXiS
Seite 3 von 3     123   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi Erstellen einer MDI Anwendung (https://www.delphipraxis.net/6166-erstellen-einer-mdi-anwendung.html)

sakura 2. Jul 2003 21:06

Folgender Code-Auschnitt sollte verdeutlichen, wie Du überprüfst, ob ein bestimmtes Formular bereits existiert. Wenn es existiert, wird es nach vorn gebracht, wenn nicht, dann wird es erstellt.
Delphi-Quellcode:
procedure TForm1.mniShowFormTyp1(Sender: TObject);
var
  I: Integer
begin
  for I := 0 to Pred(MDIChildCount) do
    if MDIChildren[I] is TMDIFormTyp1 then
    begin
      MDIChildren[I].BringToFront;
      Exit;
    end;
  TMDIFormTyp1.Create(Self);
end;
Ich hoffe, daß es Dir weiterhilft.

...:cat:...


Alle Zeitangaben in WEZ +1. Es ist jetzt 16:39 Uhr.
Seite 3 von 3     123   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz