Autor Beitrag
bonanza
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55



BeitragVerfasst: So 18.12.05 20:41 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TForm1.FormCreate(Sender: TObject);
begin
  wahl := Application.MessageBox ('Wollen Sie vorher eingene Fragen erstellen ?', 'MessageBox',
             MB_YesNo+MB_IconQuestion+MB_DefButton2);
  If (wahl = IDYes) Then Form3.Show;

end;


Hi,
immer wenn ich diese Abfragen starte, kommt ein Fehler "Acess Violiation"...woran liegt das?

danke schonmal im voraus
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: So 18.12.05 20:57 
Das liegt an dem Form3.show. Form3 ist zu dem Zeitpunkt noch gar nicht vorhanden, daher lässt es sich nicht anzeigen.

_________________
We are, we were and will not be.
bonanza Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55



BeitragVerfasst: So 18.12.05 21:49 
und wie mache ich das nun ?
JayK
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1013



BeitragVerfasst: So 18.12.05 21:50 
Du musst vorher Form3 := TForm3.Create(self) aufrufen, damit das Objekt Form3 im Speicher erstellt wird.
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: So 18.12.05 21:51 
In Onshow oder OnActivate.
bonanza Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55



BeitragVerfasst: So 18.12.05 21:58 
DANKE!
Funktioniert...