Autor Beitrag
chickenfigt1989
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 444
Erhaltene Danke: 2



BeitragVerfasst: Fr 25.03.11 22:37 
Hallo
Besitze eine Account KOmponente.
Die Loginform ist meine MAin Form und folgendes wird ausgeführt bei klick auf Loginn:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
if AccountSystemClient1.Login(edtUsername.Text, edtPassword.Text) then
  begin
    ModalResult := mrOK;
    Close;
      end
  else
    ShowMessage('Falsche Benutzerdaten!');

Allerdings wird wenn die benutzerdaten stimmen nicht Form1 aufgerufen sondern das programm wird geschloßen.
wo liegt der Fehler bei mir?
lg
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Fr 25.03.11 22:45 
vermutung: Weil das ding wo deine Komponente draufliegt das hauptformular ist. wenn du im hauptformular close; aufrufst dann wird das programm geschlossen, nicht nur das fenster. Hat man dir aber glaub ich schon ein paar mal gesagt, demnach: hawara. lern. die. grundlagen.

lg elundril

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
chickenfigt1989 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 444
Erhaltene Danke: 2



BeitragVerfasst: Fr 25.03.11 23:05 
Nein die Komponente liegt auf Form5
Das kann ich schon mal ausschließen
lg
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Fr 25.03.11 23:13 
darf ich fragen was das mit dem hauptformular zu tun hat, wie jetzt dein formular heißt? ich kann 500 Formular erzeugen und je nach lust und laune irgendeins davon zum hauptformular machen. Ich kann Form5 oder Form500 zum Hauptformular machen, je nach dem wie lustig und besoffen ich bin. Alles nur 1 Klick in den Projektoptionen...

lg elundril

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8548
Erhaltene Danke: 477

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Fr 25.03.11 23:15 
user profile iconchickenfigt1989 hat folgendes geschrieben Zum zitierten Posting springen:
Die Loginform ist meine MAin Form


user profile iconchickenfigt1989 hat folgendes geschrieben Zum zitierten Posting springen:
Nein die Komponente liegt auf Form5


Was denn nun? Mainform oder nicht?

_________________
We are, we were and will not be.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19312
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Fr 25.03.11 23:16 
user profile iconchickenfigt1989 hat folgendes geschrieben Zum zitierten Posting springen:
Nein die Komponente liegt auf Form5
user profile iconchickenfigt1989 hat folgendes geschrieben Zum zitierten Posting springen:
Die Loginform ist meine MAin Form und folgendes wird ausgeführt bei klick auf Loginn:
Was denn nun? :roll:

Zuerst hast du geschrieben, dass das Loginfenster dein Hauptformular ist, was natürlich ein Fehler wäre. Und jetzt plötzlich doch nicht?
chickenfigt1989 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 444
Erhaltene Danke: 2



BeitragVerfasst: Fr 25.03.11 23:19 
Sorry hab nochmal nachgeschaut.
Hab Form5 zum hauptformular gemacht damit die als erstes kommt.
Wie ruf ich den Form5 als erstes auf ohne das dass das hauptformular ist?
lg
ALF
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1085
Erhaltene Danke: 53

WinXP, Win7, Win10
Delphi 7 Enterprise, XE
BeitragVerfasst: Fr 25.03.11 23:22 
Ich frage mich wie Du in Deinem anderen Prog mit 300 Formen die anderen aufgerufen hast?

ALf

_________________
Wenn jeder alles kann oder wüsste und keiner hätt' ne Frage mehr, omg, währe dieses Forum leer!
chickenfigt1989 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 444
Erhaltene Danke: 2



BeitragVerfasst: Fr 25.03.11 23:25 
Das andere Programm existiert nicht mehr.
Hab se schon über Form2.show und so aufgerufen
Aber ich will das das login formular nicht das hauptformular ist aber trotzdem beim start als erstes kommt.
lg
ALF
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1085
Erhaltene Danke: 53

WinXP, Win7, Win10
Delphi 7 Enterprise, XE
BeitragVerfasst: Fr 25.03.11 23:31 
Wie währe es zur Abwechslung mal die Forensuche um Hilfe zu bitten für so simple Dinge.

Alf

_________________
Wenn jeder alles kann oder wüsste und keiner hätt' ne Frage mehr, omg, währe dieses Forum leer!
chickenfigt1989 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 444
Erhaltene Danke: 2



BeitragVerfasst: Fr 25.03.11 23:32 
Und unter welchen wort soll ich suchen?
hab bei 2stunden suchen vorhin nichts gefunden
lg
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19312
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Fr 25.03.11 23:43 
Nach SplashScreen zum Beispiel, das Prinzip ist das gleiche. Kurzfassung: Du musst das Formular einfach im Projektquelltext erzeugen, aufrufen und wieder freigeben.
ALF
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1085
Erhaltene Danke: 53

WinXP, Win7, Win10
Delphi 7 Enterprise, XE
BeitragVerfasst: Fr 25.03.11 23:44 
Das ist jetzt nicht Dein ernst: 'Form2 Form1' einzugeben und Du findest x Beispiele mit Deinem Problem und Lösungen!

Ist das Faulheit bei Dir?

ALF

_________________
Wenn jeder alles kann oder wüsste und keiner hätt' ne Frage mehr, omg, währe dieses Forum leer!
chickenfigt1989 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 444
Erhaltene Danke: 2



BeitragVerfasst: Sa 26.03.11 21:01 
Ich bekomms einfach nicht hin
Habe in Sourcecode folgendes Probiert:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
Application.CreateForm(TForm5, Form5);
  IF Form5.Showmodal:=mrOK Then Begin
Form2.Free;
  Application.CreateForm(TForm1, Form1);
  Application.CreateForm(TForm2, Form2);
  Application.CreateForm(TForm3, Form3);
  Application.CreateForm(TForm4, Form4);
  Application.Run;

Da kommt immer
[Error] Project1.dpr(17): Type of expression must be BOOLEAN
[Error] Project1.dpr(24): Record, object or class type required
[Error] Project1.dpr(26): 'END' expected but end of file found

Hab auch unter Uses Controls eingefügt.
Wo liegt der fehler?
lg
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19312
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 26.03.11 21:19 
Die allerersten Grundlagen... :roll:
user profile iconchickenfigt1989 hat folgendes geschrieben Zum zitierten Posting springen:
ausblenden Delphi-Quelltext
1:
2:
Application.CreateForm(TForm5, Form5);
  IF Form5.Showmodal:=mrOK Then Begin
Davon abgesehen ist deine Logik bestechend:
user profile iconchickenfigt1989 hat folgendes geschrieben Zum zitierten Posting springen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
Application.CreateForm(TForm5, Form5);
  IF Form5.Showmodal:=mrOK Then Begin
Form2.Free;
  Application.CreateForm(TForm1, Form1);
  Application.CreateForm(TForm2, Form2);
Also mal auf deutsch:
Erstelle Form5 (und setze es als Hauptformular, da du es mit Application.CreateForm erstellst), dann zeige es an und wenn mit Ok bestätigt wurde gib Form2 frei. Öh... Form2? Wie jetzt, das gibt es doch noch gar nicht?
Na gut, weiter: Erstelle Form1, Form2... Moment, sollte das nicht gerade erst freigegeben werden?
...
:autsch:
chickenfigt1989 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 444
Erhaltene Danke: 2



BeitragVerfasst: So 27.03.11 18:08 
Hallo
Habs jetzt so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
Application.CreateForm(TForm1, Form1);
  Application.CreateForm(TForm5, Form5);
  IF Form5.Showmodal:=mrOK Then Begin
Form1.Free;
  Application.CreateForm(TForm2, Form2);
  Application.CreateForm(TForm3, Form3);
  Application.CreateForm(TForm4, Form4);
  Application.Run;

Allerdings kommt immer:
[Error] Project1.dpr(1 8): Type of expression must be BOOLEAN
[Error] Project1.dpr(24): Record, object or class type required
[Error] Project1.dpr(26): 'END' expected but end of file found

Ich weis echt nimmer Weiter.
Die suche hat mir auch nicht geholfen.

Lg
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: So 27.03.11 18:27 
GRUNDLAGEN
ausblenden Delphi-Quelltext
1:
2:
  IF Form5.Showmodal:=mrOK Then Begin
Form1.Free;


gut, folgenden lösungsvorschlag:
erstmal: Fenster aufmachen, frischluft hilft immer beim denken.
dann: Du startest den Computer, rufst Delphi auf, prägst dir das bild ganz genau ein wie es aussieht. Dann fährst du den Computer wieder runter und schmeißt das ding so weit es geht aus dem Fenster hinaus, machst das Fenster wieder zu und kaufst dir erst wieder nen PC wenn du gelernt hast das manche menschen einfach die finger von dingen lassen sollten, wenn sie zu faul/unmotiviert/ oder sonstwas sind um mal sich auf ihren hintern zu setzen und zu lernen. Und wenn das mal der fall sein sollte, dann kauf dir wieder nen PC aber bitte, bitte, installier nie wieder Delphi.

lg elundril

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
chickenfigt1989 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 444
Erhaltene Danke: 2



BeitragVerfasst: So 27.03.11 18:31 
meinte nicht Form1.free; sondern Form5.free;
aber kommen imemr ncoh die gleichen fehlermeldungen
lg
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19312
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 27.03.11 18:33 
user profile iconelundril hat folgendes geschrieben Zum zitierten Posting springen:
wenn sie zu faul/unmotiviert/
Und dazu kommt noch eine gehörige Portion Dummheit, anders kann ich mir das echt nicht erklären, schließlich hatte ich den Fehler ja schon genau markiert, und trotzdem wurde genau die Stelle gleich gelassen. Vielleicht als Info: Der IQ des Nutzers sollte höher als die Compilerversion von Delphi sein, das sollte mal in die Systemvoraussetzungen rein... :roll:

Um die sinnlose Diskussion zu beenden:
Ein Vergleich passiert mit einem Gleichheitszeichen, mehr nicht.

Für diesen Beitrag haben gedankt: elundril, Marc.
chickenfigt1989 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 444
Erhaltene Danke: 2



BeitragVerfasst: So 27.03.11 18:38 
Auch wenn ich es so mache:
ausblenden Delphi-Quelltext
1:
IF Form5.Showmodal=mrOK Then Begin					

Kommt:
[Error] Project1.dpr(18): Undeclared identifier: 'mrOK'
[Error] Project1.dpr(24): Record, object or class type required
[Error] Project1.dpr(26): 'END' expected but end of file found

lg