AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Letzte Anwendung aktivieren

Ein Thema von sakura · begonnen am 11. Mai 2003 · letzter Beitrag vom 11. Mai 2003
Antwort Antwort
Benutzerbild von sakura
sakura

Registriert seit: 10. Jun 2002
Ort: München
11.412 Beiträge
 
Delphi 11 Alexandria
 
#1

Letzte Anwendung aktivieren

  Alt 11. Mai 2003, 13:25
Hi DPler,

wie kann ich eigentlich rausfinden, welche der aktuell laufenden Anwendungen die nächste wäre, wenn der Benutzer einfach mit [Alt]+[Tab] wechseln würde. Und wie kann ich diese Anwendung in den Vordergrund holen und als aktive setzen?

......
Daniel W.
Ich bin nicht zurück, ich tue nur so
  Mit Zitat antworten Zitat
Benutzerbild von Motzi
Motzi

Registriert seit: 6. Aug 2002
Ort: Wien
598 Beiträge
 
Delphi XE2 Professional
 
#2
  Alt 11. Mai 2003, 13:41
Also IMHO enthält die Alt-Tab Liste nur jene Fenster die auch in der Taskleiste aufscheinen und zwar in der Reihenfolge des Z-Orders des Desktops.. (hoffe man kennt sich aus was ich meine )
Manuel Pöter
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#3
  Alt 11. Mai 2003, 13:43
Genau weiß ich es auch nicht. Aber ist das nicht die z-Order? dann kuck dir mal in deiner Anwendung WM_ACTIVATE an:
Zitat:
wParam
The low-order word specifies whether the window is being activated or deactivated. This parameter can be one of the following values. The high-order word specifies the minimized state of the window being activated or deactivated. A nonzero value indicates the window is minimized.
WA_ACTIVE
Activated by some method other than a mouse click (for example, by a call to the SetActiveWindow function or by use of the keyboard interface to select the window).
WA_CLICKACTIVE
Activated by a mouse click.
WA_INACTIVE
Deactivated.
lParam
Handle to the window being activated or deactivated, depending on the value of the wParam parameter. If the low-order word of wParam is WA_INACTIVE, lParam is the handle to the window being activated. If the low-order word of wParam is WA_ACTIVE or WA_CLICKACTIVE, lParam is the handle to the window being deactivated. This handle can be NULL.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Benutzerbild von sakura
sakura

Registriert seit: 10. Jun 2002
Ort: München
11.412 Beiträge
 
Delphi 11 Alexandria
 
#4
  Alt 11. Mai 2003, 13:44
Ich weiss was Du meinst, ich diese Liste meine ich auch. Trotzdem habe ich irgendwie eine Blockierung und komme da nicht ran.

......
Daniel W.
Ich bin nicht zurück, ich tue nur so
  Mit Zitat antworten Zitat
Daniel B
(Gast)

n/a Beiträge
 
#5
  Alt 11. Mai 2003, 13:45
Hallo,

in den Vordergrund bringen könntest Du es damit, aber wie man das nächste findet weiss ich jetzt auch nicht.
SetForegroundWindow(Application.Handle); Grüsse, Daniel
  Mit Zitat antworten Zitat
Benutzerbild von nailor
nailor

Registriert seit: 12. Dez 2002
Ort: Karlsruhe
1.989 Beiträge
 
#6
  Alt 11. Mai 2003, 13:50
Wie siehts aus mit

Zitat von So eine Datei von MS:
The GetNextWindow function retrieves the handle of the next or previous window in the Z order. The next window is below the specified window; the previous window is above. If the specified window is a topmost window, the function retrieves the handle of the next (or previous) topmost window. If the specified window is a top-level window, the function retrieves the handle of the next (or previous) top-level window. If the specified window is a a child window, the function searches for a handle of the next (or previous) child window.
dann gibts da noch mehr, mit deren Kombination das dann sogar sakura schaffen sollte
Michael N.
http://nailor.devzero.de/code/sharpmath/testing/ --- Tests, Feedback, Anregungen, ... aller Art sehr willkommen!
::: don't try so hard - it'll happen for a reason :::
  Mit Zitat antworten Zitat
Daniel B
(Gast)

n/a Beiträge
 
#7
  Alt 11. Mai 2003, 13:51
Hallo,

jetzt hab ich wegen Dir Google angeworfen. Du schuldest mir was.

Vielleicht findest Du es hiermit.

Grüsse, Daniel
  Mit Zitat antworten Zitat
Benutzerbild von nailor
nailor

Registriert seit: 12. Dez 2002
Ort: Karlsruhe
1.989 Beiträge
 
#8
  Alt 11. Mai 2003, 13:52
...sorry, die Info die ich hier stehen hatte war einfach nur falsch, deshalb hab ich sie mal wieder weg gemacht...
Michael N.
http://nailor.devzero.de/code/sharpmath/testing/ --- Tests, Feedback, Anregungen, ... aller Art sehr willkommen!
::: don't try so hard - it'll happen for a reason :::
  Mit Zitat antworten Zitat
Benutzerbild von toms
toms
(CodeLib-Manager)

Registriert seit: 10. Jun 2002
4.648 Beiträge
 
Delphi XE Professional
 
#9
  Alt 11. Mai 2003, 13:57
Hi,

Folgende 3 Möglicheiten fallen mir da ein:

1) WM_SETFOCUS und WM_KILLFOCUS in einem WH_CALLWNDPROC Hook abfragen.

2) WM_ACTIVATE hooken und die übergebenen Parameter abfragen (siehe Msdn)

3) In einem WH_SHELL Hook HSHELL_WINDOWACTIVATE abfangen.

Weitere Infos gibt's in der msdn.
Vielleicht geht's ja auch ohne Hooks?
Thomas
  Mit Zitat antworten Zitat
Benutzerbild von toms
toms
(CodeLib-Manager)

Registriert seit: 10. Jun 2002
4.648 Beiträge
 
Delphi XE Professional
 
#10
  Alt 11. Mai 2003, 14:10
Hier noch 2 Antworten aus den Google-PAQs:

Zitat:
There is no really reliable way to do that in Win32. What you can try is

wnd:= GetWindow( yourform.handle, GW_HWNDNEXT );

It will return the window beneath yours in the Z order. That may or may not be
the last active window (usually it will be).
(P. Below)


Zitat:
I've tried to track the active windows using hooks, but was not really
successfull up to now.
WH_SHELL - seemed to be the most promising, but did not work as documented

WH_SHELL using Shell32's ShellHookProc as the Hook Proc (undocumented),
worked once, never again
WH_CBT - NT hang after installing the system-wide hook, I must be doing
something wrong
WH_CALLWNDPROC + WH_GETMESSAGE and then tracking WM_ACTIVATEAPP - got way
to many notifications
(Alex Hekstra)
Thomas
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:55 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz