Autor Beitrag
Nomis
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: Mi 18.09.02 18:16 
Wiso ist es nicht möglich

ausblenden Quelltext
1:
  form2.showmodal;					


in eine Formcreat Anweisung zu schreiben mit einem Button funktioniert es.

Kann man das irgendwie anders machen ( Für eine Passwortabfrage soll erst form1 auf gesammten Bildschirm ausgeführt werden und form2 modal im Vordergrund

Danke schon mal Gruß Simon
O'rallY
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 563



BeitragVerfasst: Mi 18.09.02 18:49 
Das Problem ist, dass die Prozedur Form1.Create vor der initialisierung der Form2 ausgeführt wird. Form2 existiert praktisch noch gar nicht und kann daher auch nicht angesprochen werden. Schreib das ganze doch mal ins OnShow-Event der Form1. Damit müsste es gehen.

_________________
.oO'rallY
Linux is like a tipi: No gates, no windows and a gnu-eating apache inside...
Nomis Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: Do 19.09.02 15:34 
Danke Dir Funktioniert super
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 19.09.02 16:04 
Dann mußt du aber ein Flag setzen, sondt wird dein Form2 immer angezeigt, wenn dein Form1 angeteigt wird, auch aus der taskbar.
Nomis Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: Sa 21.09.02 10:39 
Wie funktioniert das mit der Flag??
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 21.09.02 12:38 
Einfach eien globaler Bool-Variable, die anzeigt, ob es schon mal angezeigt wurde oder nicht eben.
Chatfix
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1583
Erhaltene Danke: 10

Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
BeitragVerfasst: So 22.09.02 16:01 
geht es nicht das showmodal ins onactivate zu setzen? oder ist das das gleiche wie mit oncreate?

ansonsten halt wirklich mit einem Flag

_________________
Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: So 22.09.02 16:59 
Ist es nicht möglich, im Form1.onCreate die Form2.Create aufzurufen, sodaß diese dann existiert und danach Form2.ShowModal auszuführen? Natürlich wenn man die Form2 nicht im Auto-Create hat.

Würde doch eigentlich so gehen, oder?

Tschüß
Thomas

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert