Autor Beitrag
Stefan-W
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 475

Win 7 SP1
D2005 PE
BeitragVerfasst: Mo 13.10.03 19:12 
Hallo erstmal...

Kann mir einer bei meinem Problem helfen???
Ich möchte ein Programm beenden, wenn mann außerhalb der Form's Klickt!
Ich hab es mit einem transparenten Hintergrund und einem Panel in der mitte versucht nur das startet dann zu langsam.

:nixweiss: Nun, ich hab keinen blassen Schimmer wie ich das realisieren kann

währe schön wenn mir jemand hilft...

Schon mal danke im voraus!!!

Gruß Stefan
obbschtkuche
Gast
Erhaltene Danke: 1



BeitragVerfasst: Mo 13.10.03 19:16 
vielleicht Application.OnDeactivate?
das wird aber immer ausgeführt wenn die Anwendung den Fokus verliert.
Stefan-W Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 475

Win 7 SP1
D2005 PE
BeitragVerfasst: Di 14.10.03 20:01 
Hi

Du das Application.OnDeactivate geht nicht, das hab ich schon versucht!

wobei wir nun wieder am anfang währen...

schade aber da muss es doch eine Möglichkeit geben, in Profan ging das ja auch und das sogar schön schnell
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Mi 15.10.03 14:35 
Wie das klappt nicht?

Wird das OnDeactivate Event nicht ausgeführt? Das Form müsste auch über so ein Event verfügen. Versuch es mal damit.

Gruß
Tino
Stefan-W Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 475

Win 7 SP1
D2005 PE
BeitragVerfasst: Mi 15.10.03 16:01 
Das mit dem Form hab ich schon versucht das geht nur bei 2 eigenen Form's

Das mit gem Application.OnDeaktivate hab ich nicht ganz begriffen und sicher falsch gemacht

Ich dachte das geht mit nem Focus oder Handle kömme ich aber auch nicht weiter

naja...

Gruß Stefan
maze2k
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 252

WIN 95, WIN NT 4.0, WIN 98, WIN 98SE, WIN 2000, RedHat Linux 7.3, Mandrake Linux 9.2, Knoppix Linux 3.3
D6 Pers
BeitragVerfasst: Mi 15.10.03 16:05 
Hm. find doch einfach die Koordinaten des Mausklick's raus und stell fest ob es innerhalb oder ausserhalb deine Form is.
Wenn's ausserhalb is -> Form.Close;

_________________
Wer das Konzept der Unendlichkeit verstehen will, muss nur das Ausmaß menschlicher Dummheit betrachten. (Voltaire)
Stefan-W Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 475

Win 7 SP1
D2005 PE
BeitragVerfasst: Mi 15.10.03 16:39 
Ich hab es GESCHAFFT!!!

Ich hab noch einwenig rum probiert und nachgedacht (über Application) und da ist mir die Kommponente in Zusätzliches aufgefallen(ApplicationEvents oder so) da gibt es so ein OnDeaktivate und da geht das wunderbar
Stefan-W Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 475

Win 7 SP1
D2005 PE
BeitragVerfasst: Mi 15.10.03 18:27 
Oje...

Das geht aber nicht in XP kann mir da noch jemand helfen????
maze2k
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 252

WIN 95, WIN NT 4.0, WIN 98, WIN 98SE, WIN 2000, RedHat Linux 7.3, Mandrake Linux 9.2, Knoppix Linux 3.3
D6 Pers
BeitragVerfasst: Mi 15.10.03 18:29 
Zitat:
Hm. find doch einfach die Koordinaten des Mausklick's raus und stell fest ob es innerhalb oder ausserhalb deine Form is.
Wenn's ausserhalb is -> Form.Close;


siehe oben *lol*

_________________
Wer das Konzept der Unendlichkeit verstehen will, muss nur das Ausmaß menschlicher Dummheit betrachten. (Voltaire)
Terra23
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 872

Win 8
Delphi 7
BeitragVerfasst: Mi 15.10.03 19:00 
... genau. Das Stichwort dazu heißt GetCursorPos und wenn du hier danach suchst (Suche in: Delphi-Forum, Delphi-Library GETCURSORPOS), dann kommst du auf diesen Link.. :-)

_________________
Hasta La Victoria Siempre
Stefan-W Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 475

Win 7 SP1
D2005 PE
BeitragVerfasst: Do 16.10.03 16:07 
Das mit dem GetCursorPos geht nicht, sobald ich ausserhalb klicke ist mein Proc inaktiv und arbeitet nix mehr ab, d.h. ich müsste die Maustaste in meinem Form drücken, dann raus ziehen, und dann loslassen, und dann gehts.

aber das macht doch keiner!!!

wie kann ich das noch lösen?? :nixweiss:

Gruß Stefan
Stefan-W Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 475

Win 7 SP1
D2005 PE
BeitragVerfasst: Sa 18.10.03 14:13 
Ich hab nochmal geforscht und bin nun doch zu einem Ergebniss gekommen. Das OnDeaktivate von Form geht unter XP und das OnDeaktivate von ApplicationEvents geht unter win 98.

Hab also eine Antwort auf meine Frage gefunden!!!

nur leider hilft mir das nicht ganz weil unter XP mein Programm direckt nach dem Start deaktiviert wird, zwar noch sichtbar bleibt ich aber erst wieder hinein klicken muss um dann mit dem Programm zuarbeiten.