Autor Beitrag
Leuchtturm
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1087

Win Vista, Knoppix, Ubuntu
Delphi 7 Pe, Turbo Delphi, C#(VS 2005 Express), (X)HTML + CSS, bald Assembler
BeitragVerfasst: Sa 27.05.06 15:54 
Hi,
weiß jemand wie man das "X" oben rechts in der Ecke programmieren kann.
Also das statt das Programm zu schließen zum Beispiel vorher noch zu fragen ob man das Programm wirklich beenden will.
Danke im voraus
Leuchtturm

_________________
Ich bin dafür verantwortlich was ich sage - nicht dafür was du verstehst.
Marc.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1876
Erhaltene Danke: 129

Win 8.1, Xubuntu 15.10

BeitragVerfasst: Sa 27.05.06 16:04 
das "x" nennt man den schließen button in der leiste.
Und was meinst du mit "x" programmieren? :roll:

Eine Abfrage, ob das Programm wirklich geschlossen werden soll, geht übrigens so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
 if (MessageDlg('Wollen sie das Programm wirklich beenden?',mtConfirmation,[mbYes,mbCancel],0) = mrCancel) then
  Action :=  caNone;
end;
der Berliner
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 417

Win Xp Home
delphi 2005
BeitragVerfasst: Sa 27.05.06 16:07 
Hallo
Ich hab da auch noch ne Variante:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
var mb_s:word ;
begin
mb_s:=32;
 if Application.MessageBox('Wirklich beenden ?','Achtung',mb_s+mb_YesNo)=idyes then
  canclose:=True
 else CanClose:=False;
end;

Gruß

_________________
[b]Ich weiß nicht immer, wovon ich rede. Aber ich weiß, dass ich recht habe.[b]
Leuchtturm Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1087

Win Vista, Knoppix, Ubuntu
Delphi 7 Pe, Turbo Delphi, C#(VS 2005 Express), (X)HTML + CSS, bald Assembler
BeitragVerfasst: So 28.05.06 09:03 
Danke

_________________
Ich bin dafür verantwortlich was ich sage - nicht dafür was du verstehst.