Autor Beitrag
JJ
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 100

Windows XP 64 bit!
delphi 5
BeitragVerfasst: So 13.08.06 12:38 
kann man irgendwie im onclose noch verhindern ,dass die betreffende Form geschlossen wird?

_________________
Hallo!
Jakob Schöttl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 929
Erhaltene Danke: 1


Delphi 7 Professional
BeitragVerfasst: So 13.08.06 12:43 
glaub schon, da gibt es einen Parameter Action, dem kann man auf caNone setzen, dann dürfte ncihts passieren.
Code Bedeutung

caNone Das Formular darf nicht geschlossen werden, daher geschieht nichts.
caHide Das Formular wird nicht geschlossen, sondern lediglich verborgen. Die Anwendung kann nach wie vor auf das Formular zugreifen.
caFree Das Formular wird geschlossen und sein Speicher freigegeben.
caMinimize Das Formular wird nicht geschlossen, sondern als Symbol angezeigt. Bei untergeordneten MDI-Formularen ist dies die Standardeinstellung.

Ach ja, OnCloseQuery, das wird vor OnClose aufgerufen da gibt es den variablen Parameter CanClose. Warum nimmst du nicht das Event her?


Zuletzt bearbeitet von Jakob Schöttl am So 13.08.06 12:45, insgesamt 1-mal bearbeitet
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: So 13.08.06 12:44 
OnCloseQuery hast du dir schon angesehen, oder?

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
JJ Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 100

Windows XP 64 bit!
delphi 5
BeitragVerfasst: So 13.08.06 12:54 
ja klar ... nur ich habe eine Aufnahme in meinem Programm. Vor abbrechen der aufnahe (also wenn man das Fenster schließt) wird gefragt ob die aufnahme abgebrochen wird.Wenn der User auf nein klickt darf die form unter keinen umständen geschlossen werden. onclosequery canclose:=false kenn ich shcon ... nur wie soll ich das aus onclose heraus reinmachen. Und wird das nicht verher aufgerufen?

_________________
Hallo!
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: So 13.08.06 12:56 
Warum willst du das den aus OnClose heraus machen?

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
JJ Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 100

Windows XP 64 bit!
delphi 5
BeitragVerfasst: So 13.08.06 12:57 
hab schon mehrere Sachen durchgespielt. DAs ist die einfachste Lösung...

_________________
Hallo!
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: So 13.08.06 12:59 
Warum reicht dir nicht die Abfrage im OnCloseQuery und notfalls CanClose := false?

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
JJ Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 100

Windows XP 64 bit!
delphi 5
BeitragVerfasst: So 13.08.06 13:40 
ok ich bin echt ma doof... du hast völlig recht ... vielen DAnk :) * :) Problem gelöst

_________________
Hallo!