Autor Beitrag
Krull
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20


D7 Personal
BeitragVerfasst: Fr 11.02.05 12:32 
Kann man irgendwie verhindern, dass ein Programm über Alt+F4 anstatt über einen Button beendet wird?
OneOfTen
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Fr 11.02.05 12:37 
im OnCloseQuery-Ereignis des Formulars CanClose auf false setzen und nur wenn der Button gedrückt wird auf true, dann funktioniert das glaub ich
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Fr 11.02.05 12:37 
Hallo Krull :welcome:
Das Ereignis CloseQuery der Form sollte dir da weiterhelfen.
Dort kannst du CanClose setzen.
Du solltest aber im Programm noch einen Button haben, der eine Variable setzt. Diese musst du dann im CanClose abfragen. Sonst kannst du das Programm gar nicht mehr beenden :wink:

EDIT: Zu langsam
Krull Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20


D7 Personal
BeitragVerfasst: Fr 11.02.05 13:36 
Vielen Dank für die schnelle Hilfe! :D