Autor Beitrag
[r2d2]
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 109

WinXP
D5 Enterprise
BeitragVerfasst: Do 11.12.03 00:48 
Hallo
Wie kann man denn eigentlich ein Programm in den Vordergrund holen, wenn es hinter anderen versteckt ist? Mir ist das bisher nur so gelungen:
ausblenden Delphi-Quelltext
1:
2:
FormStyle:=fsStayOnTop;
FormStyle:=fsNormal;

Gibt es dafür noch eine elegantere Lösung?

Es wäre außerdem nicht schlecht, wenn ich herausfinden könnte, ob sich das Programm vielleicht schon im Vordergrund befindet
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 11.12.03 09:47 
Die Situation würde mich mal interessieren. Soll sich dein Programm allein (= automatisch) in den Vordergrund setzen? Wenn du es nämlich anklickst, dann ist es ja aktiv und im Vordergrund. ;)

Ansonsten folge einfach mal diesen Links:

Suche in: Delphi-Forum, Delphi-Library SETFOREGROUNDWINDOW
Suche in: Delphi-Forum, Delphi-Library GETFOREGROUNDWINDOW
Suche in: Delphi-Forum, Delphi-Library SETACTIVEWINDOW

Speziell der zweite dürfte dich u.a. auf einen FAQ-Beitrag von Tino verweisen, der dir vielleicht schon weiterhilft.
[r2d2] Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 109

WinXP
D5 Enterprise
BeitragVerfasst: Do 11.12.03 17:39 
Danke für die Antwort. Es soll sich natürlich automatisch in den Vordergrund setzen, so blöd bin ich dann ja nun auch wieder nicht. :roll:
Andreas Pfau
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 997



BeitragVerfasst: Do 11.12.03 22:57 
Hallo,

ich nehme immder den Code:
ausblenden Delphi-Quelltext
1:
2:
ShowWindow(Form1.Handle, SW_RESTORE);
SetForegroundWindow(Form1.Handle);

funzt garantiert! Auch wenn die Anwendung minimiert ist.

Moderiert von user profile iconPeter Lustig: Tags repariert

_________________
Life is a bad adventure, but the graphic is really good!
[r2d2] Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 109

WinXP
D5 Enterprise
BeitragVerfasst: Fr 12.12.03 15:18 
Danke, funzt