Autor Beitrag
Regan
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2157
Erhaltene Danke: 72


Java (Eclipse), Python (Sublimetext 3)
BeitragVerfasst: Mo 09.10.06 18:10 
Hallo,
ich habe ein Programm geschrieben, dass mit Windows startet und das während der Laufzeit immer wieder Informationen abruft und schreibt. Ich habe in das Programm eingebaut, dass wenn man es schließen will, dass es eine Messagebox ausgibt ob man das Programm wirklich schließen möchte. Wenn ja dann ist CanClose auf true. Wenn Nein dann auf False. Dsa sieht dann so aus:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
if Application.MessageBox(PChar('Willst du '+ExtractFileName(Application.ExeName) +' wirklich schließen?'+#13#10+#13#10+'Anstatt es zu schließen, kannst du es auch minimiren!'),'Wirklich schließen?',MB_YESNO)=6 then begin
Canclose:=true;
[...]
end
else
begin
Canclose:=false;
[...]
end;
end;

Wenn ich nun aber Windows beende, dann kommt auch diese Frage. Ich will aber, dass das Programm dann einfach nur beendet wird. Ohne Daten zu speichern oder irgendetwas zu tun. Es soll dann nichts machen. Wie kriege ich das hin?

MfG
Regan
rizla
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 417
Erhaltene Danke: 2

XP
FPC mit Lazarus
BeitragVerfasst: Mo 09.10.06 18:24 
Hi Regan,
vllt hilft dir das hier:
www.dsdt.info/tipps/?id=196

ansonsten:

www.google.de/search....mozilla:de:official
(almighty google)

:r!a:

_________________
if you have what they want - they'll find a way to take it (bruce sterling)
WOW - 10 JAHRE Mitglied beim Delphi-Forum. Wie die Zeit vergeht, Freunde.
azubi_20
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 593

WinXP SP2, Ubuntu 8.4
D7 Enterp., D2005 Prof., Java (Eclipse 3.4.0)
BeitragVerfasst: Mo 09.10.06 19:15 
siehe hierzu auch folgenden Beitrag aus dem Delphiforum :
OnCloseQuery und PC Herunterfahren
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Mo 09.10.06 19:19 

_________________
Programmers never die, they just GOSUB without RETURN
Regan Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2157
Erhaltene Danke: 72


Java (Eclipse), Python (Sublimetext 3)
BeitragVerfasst: Mi 11.10.06 11:38 
Danke. Funktioniert alles super.