Autor Beitrag
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Fr 14.02.03 23:41 
Hab da mal ne Frage zum zeigen von weiteren Forms direkt beim Start des Programms:
Ich möchte unter bestimmten Voraussetzungen direkt beim Programmstart verschiedene Eingabemasken öffnen. Ich hab versucht, das in die oncreate-prozedur reinzupacken:
ausblenden Quelltext
1:
2:
3:
4:
5:
 if {dies und das} do begin
eingabeform1.showmodal;
eingabeform2.showmodal
{...}
end;

Das geht aber nicht, weil eingabeform1 / 2 beim Ereignis oncreate des Hauptfensters noch gar nicht existieren.
Wie kann ich das trotzdem hinkriegen?
ErnestoChe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 528

Win 2000 pro, CRUX 2.0
Delphi 6 Pers, Open K3
BeitragVerfasst: Fr 14.02.03 23:47 
Hi,

schreib es in das OnActivate-Ereignis deiner Haupt-Form, dann gehts auf jeden Fall.

MFG

- Ernesto -
Gausi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Sa 15.02.03 00:01 
danke so gehts.
-------
Ich finde es immer wieder überraschend, wie schnell man hier geholfen wird. Ein klasse Bord.
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Sa 15.02.03 08:09 
oder ins onshow ereignis!
Gausi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Sa 15.02.03 12:09 
ja, das geht auch. Bei beiden Vorschlägen muss man aber sicherstellen, dass sich die Bedingungen für das Anzeigen der Unterformen nach dem Anzeigen auf jeden Fall geändert haben. Sonst hat man da ne schöne Schleife...

Dieses Problem hätte man bei "oncreate" nicht.

Aber es läuft, und eine Boolsche Variable mehr in der INI-Datei macht auch nix.