Autor Beitrag
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Sa 12.01.08 14:22 
Hallo,

ich arbeite mit einem Timer und schau immer wieder nach ob ein bestimmtes ereignis eingetreten ist (Eingestelltes Datum & Uhrzeit = Jetzt). Dann soll ein bestimmtes Formular in den Vordergrund geholt werden.

Application.ShowMainWindows := false und ich benutze ein CoolTrayIcon.

Ich habs nun mit Form1.BringToFront probiert aber das problem ist, wenn ein anderes Programm den Fokus hat wir mein Fenster nicht ganz nach vorne gebracht sondern das andere bleibt sichtbar.

Gibts eine möglichkeit das dieses Fenster beim TimerEvent ganz nach vorne gebracht wird auch wenn mein Programm nicht den fokus hat??

Suche hat leider nichts ergeben da es anscheinend für das suchscript zu schwer was.

lg elundril


Moderiert von user profile iconChristian S.: Topic aus Delphi Language (Object-Pascal) / CLX verschoben am Sa 12.01.2008 um 14:26

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: Sa 12.01.08 14:33 
Haste's schonma' mit Form1.SetFocus; versucht?
Yogu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2598
Erhaltene Danke: 156

Ubuntu 13.04, Win 7
C# (VS 2013)
BeitragVerfasst: So 13.01.08 11:57 
Mit SetWindowPos kannst du einstellen, ob ein Fenster im Vordergrund ist. (Und noch viel mehr, aber das tut hier nichts zur Sache :wink: )

ausblenden Fenster im Vordergrund
1:
SetWindowPos(Handle, HWND_TOPMOST, Left, Top, Width, Height, 0)					

ausblenden Fenster wieder normal
1:
SetWindowPos(Handle, HWND_NOTOPMOST, Left, Top, Width, Height, 0);					

Wenn du beide Zeilen nacheinander ausführst, wird das Fenster in den Vordergrund geholt, und ist wieder normal. Wenn das Fenster im Vordergrund bleiben soll, reicht es, wenn du die erste zeile ausführst.
elundril Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: So 13.01.08 12:56 
danke werd mal beides probieren.

lg elundril

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.