Autor Beitrag
BadAzz
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33



BeitragVerfasst: So 04.12.05 17:55 
Was muss ich machen, damit wenn man z.B. das programm beendet, dass davor eine abfrage kommt speichern? wenn man auf ja klickt dann soll er halt speichern.

Ich hoffe ihr versteht was ich meine!!!
GSE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: So 04.12.05 17:57 
schau dir mal das Ereignis OnCloseQuery deiner MainForm an

mfg
GSE

_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs
and the universe trying to produce bigger and better idiots. So far, the universe is winning. (Richard Cook)
BadAzz Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33



BeitragVerfasst: So 04.12.05 17:59 
:oops: was muss da hin?
GSE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: So 04.12.05 18:01 
klick deine Form mal an (freie Stelle) und geh' dann im ObjektInspektor auf Ereignisse und dort doppelt in das Lehre Feld neben OnCloseQuery klicken, tada.

mfg
GSE

_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs
and the universe trying to produce bigger and better idiots. So far, the universe is winning. (Richard Cook)
Amateur
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 777

(Win98, WinMe) WinXP Prof
D3 Prof, D6 Pers, D2k5 Pers., Turbo C++ Explorer
BeitragVerfasst: So 04.12.05 18:04 
und dahin schreibste deinen code zum speichern. wenn du nicht weisst wie das geht empfehle ich folgende links:
Crashkurs Delphi
und
Delphi Source
und
Delphi Basics für diverse Befehle

_________________
"Kein dummes Gerede. Kein Rumrätseln. Denkt an nichts anderes mehr, nur noch an das, was vor euch liegt. Das ist die wahre Herausforderung. Ihr müßt euch vor euch selbst schützen, Leute." (Rennes in "Cube")
Beiträge: >700
BadAzz Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33



BeitragVerfasst: So 04.12.05 18:16 
Also ich hab jetzt am ende das hin geschrieben:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TFormCloseq.FormCloseQuery(Sender: TObject;
  var CanClose: Boolean);
VAR Antwort : INTEGER;
begin
   Antwort := Application.MessageBox ('Programm wirklich beenden?',
              'MessageBox',
              MB_YesNo+MB_IconQuestion+MB_DefButton2);
   CanClose := Antwort = IDYes;
end;


und bei dem query hab ich:
FormCloseQuery

ist das richtig?

Moderiert von user profile iconraziel: Delphi-Tags hinzugefügt.
Born-to-Frag
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: So 04.12.05 18:24 
Warum probierst du es nicht einfach aus?

Ich denk es wird klappen..

greetz
BadAzz Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33



BeitragVerfasst: So 04.12.05 18:30 
nee weil es eben nicht geklappt hatte aber ich hatte die variable antwort nicht definiert. danke