Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi Problem bei meinem Loginsystem & der Hauptunit (https://www.delphipraxis.net/166668-problem-bei-meinem-loginsystem-der-hauptunit.html)

haentschman 24. Feb 2012 08:07

AW: Problem bei meinem Loginsystem & der Hauptunit
 
Hmmm... daß Form3 deine MainUnit sein soll ist eher ungewöhnlich. :roll:

versuche mal folgenden Ablauf:
1. MainUnit ist Form1 (automatisch erzeugt)
2. LoginForm ist Form3 (automatisch erzeugt)
3. Im OnShow der MainUnit (Form1) die Form3 modal anzeigen (ShowModal)
4. im OnShow Rückgabewert auswerten
5. je nach Rückgabe weiter im Programm oder Mainform ggf. schließen.

Bummi 24. Feb 2012 11:12

AW: Problem bei meinem Loginsystem & der Hauptunit
 
Je nach Anforderung vielleicht auch so?
Delphi-Quellcode:
program Project1;

uses
  Forms,Controls,
  Unit2 in 'Unit2.pas' {Mainform},
  Unit3 in 'Unit3.pas' {Loggin};

{$R *.res}

begin
  Application.Initialize;
  With TLoggin.Create(Application) do
    try
      Showmodal;
      if Modalresult = mrOK then
        begin
          Application.MainFormOnTaskbar := True;
          Application.CreateForm(TMainform, Mainform);
          Application.Run;
        end;
    finally
      Free;
    end;
end.


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:53 Uhr.
Seite 2 von 2     12   

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