Autor Beitrag
[H]anf[L]ord
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 28.04.05 13:45 
Morgen,

als DF-Anfänger :D habe ich mal folgende Frage :

Wie kann ich machen, dass, wenn man bei meinr vlc-Anwendung irgendwo hinklickt ( ich glaub Event :arrow: OnClick) sich die anwendung schließt ???

Ich danke euch..

Moderiert von user profile iconTino: Titel geändert.
Moderiert von user profile iconTino: Topic aus Sonstiges verschoben am Do 28.04.2005 um 14:47
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Do 28.04.05 13:46 
Am besten Close vom Hauptfenster aufrufen.
[H]anf[L]ord
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 28.04.05 13:47 
user profile iconTino hat folgendes geschrieben:
Am besten Close vom Hauptfenster aufrufen.


sorry :D , aber wie mach ich dass ??
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Do 28.04.05 13:48 
Du klickst erst das Objekt auf deinem Formular an, bei dem du möchtest, dass es bei einem Klick dein Programm beendet. Dann links in Objektinspektor auf "Ereignisse" (bzw. engl. "Events") umschalten. Dort suchst du "OnClick". Im weißen Feld rechts davon klickst du doppelt rein. Im Code-Fenster, das sich nun öffnet fügst du folgenden Code rein:
ausblenden Delphi-Quelltext
1:
Application.MainForm.Close;					


;)
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Do 28.04.05 13:48 
In letzter Zeit kann ich ja richig Werbung für meinen Crashkurs Delphi machen. :mrgreen:

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
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: Do 28.04.05 13:49 
user profile icon[H]anf[L]ord hat folgendes geschrieben:
... ( ich glaub Event :arrow: OnClick) sich die anwendung schließt ???
...

Dort schreibst du:
ausblenden Delphi-Quelltext
1:
close;					
[H]anf[L]ord
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 28.04.05 13:50 
Danke
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Do 28.04.05 13:50 
user profile iconjasocul hat folgendes geschrieben:
user profile icon[H]anf[L]ord hat folgendes geschrieben:
... ( ich glaub Event :arrow: OnClick) sich die anwendung schließt ???
...

Dort schreibst du:
ausblenden Delphi-Quelltext
1:
close;					


Funktioniert nur, wenn das auch das Hauptformular ist. ;) Sonst schließt sich nur das Formular und das Project bleibt im Speicher. ;)