Autor Beitrag
msickel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 64

WinXP Pro
Delphi 2 Pro, Delphi 4 Pro, Delphi 7 Pers, Delphi 2005 Pers, Delphi 2005 Pro
BeitragVerfasst: Do 13.12.07 17:36 
Hallo

wie kann ich den ein Fenster in den Vordergrund bringen ohne das z.B meine Aktive Anwendung wie Word oder Excel oder auch alle anderen den Focus verlieren?

Martin
Henry
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 619

WinXP Prof. SP3
D6 Prof.
BeitragVerfasst: Do 13.12.07 17:52 
Hallo,

ich weiß jetzt zwar nicht ganau was Du mit Focus verlieren meinst, aber Deine Anwendung kannst mit
ausblenden Delphi-Quelltext
1:
FormX.FormStyle := fsStayOnTop;					


Immer in den Vordergrund setzen, so das Du trotzdem mit den anderen Anwendungen arbeiten kannst.

Ich hoffe ich habe Dich da nicht falsch verstanden.

_________________
mfg Henry
msickel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 64

WinXP Pro
Delphi 2 Pro, Delphi 4 Pro, Delphi 7 Pers, Delphi 2005 Pers, Delphi 2005 Pro
BeitragVerfasst: Fr 14.12.07 06:59 
Hallo,
Danke für die schnelle Antwort, aber so einfach ist es leider nicht :-(

Das mit fsStayOnTop ist soweit schon klar, jedoch wenn ich z.B gerade in einem Word Dokument etwas schreibe und durch ein Ereignis das Fenster mit fsStayOnTop nach vorne gebracht wird, verliert Office den Focus so das ich erst wieder mit der Mouse meinen Text den ich gerade bearbeite aktivieren muss um weiterschreiben zu können.
Diese möchte ich nicht, sondern das Word Dokument soll weiterhin aktiv sein obwohl das andere Fenster im Vordergrund auftaucht.

Martin
noidic
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 851

Win 2000 Win XP Vista
D7 Ent, SharpDevelop 2.2
BeitragVerfasst: Fr 14.12.07 10:04 
Also ich mache das in meiner Anwendung so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TfrmNotify.PerformShow;
var F : TForm;
begin
  F := Screen.ActiveForm;
  self.Visible := true;
  F.SetFocus;
end;


PerformShow wird von der aufrufenden Form anstelle von Show aufgerufen. Die derzeit aktive Anwendung veliert zwar kurz den Focus, dies ist aber für den Benutzer nicht feststellbar (zumindest hat sich bisher niemand beschwert :) ).

_________________
Bravery calls my name in the sound of the wind in the night...
Henry
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 619

WinXP Prof. SP3
D6 Prof.
BeitragVerfasst: Fr 14.12.07 14:52 
user profile iconmsickel hat folgendes geschrieben:
Hallo,
Danke für die schnelle Antwort, aber so einfach ist es leider nicht :-(

Das mit fsStayOnTop ist soweit schon klar, jedoch wenn ich z.B gerade in einem Word Dokument etwas schreibe und durch ein Ereignis das Fenster mit fsStayOnTop nach vorne gebracht wird, verliert Office den Focus so das ich erst wieder mit der Mouse meinen Text den ich gerade bearbeite aktivieren muss um weiterschreiben zu können.
Diese möchte ich nicht, sondern das Word Dokument soll weiterhin aktiv sein obwohl das andere Fenster im Vordergrund auftaucht.

Martin


Dann habe ich mir das wohl doch zu einfach vorgestellt ;-)

_________________
mfg Henry
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Fr 14.12.07 16:52 
Eine Lösung für das Problem such ich auch gerade, weil ich auch ein Programm habe, dass in den Vordergrund soll, ohne das aktive Programm den Fokus verliert.

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
noidic
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 851

Win 2000 Win XP Vista
D7 Ent, SharpDevelop 2.2
BeitragVerfasst: Fr 14.12.07 17:35 
@GTA: meine Lösung mal ausprobiert?

_________________
Bravery calls my name in the sound of the wind in the night...
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Fr 14.12.07 18:02 
So wie ich es ausprobiert hab, funktioniert es scheinbar nicht. Bei mir ist es im Prnzip nur ein PopUpMenu, welches am Mauszeiger öffnen soll, ohne, dass das aktive Fenster den Fokus verliert und der markierte Text im aktiven Fenster markiert bleibt.

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
Atreyu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 137


Delphi 7 Enterprise
BeitragVerfasst: Sa 15.12.07 20:47 
Ich denke mal, man müsste ja dazu das Handle auf seine Form legen, diese in den Vordergrund bringen und das Handle wieder an das ursprüngliche Programm zurückgeben. Ob das machbar ist...?
msickel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 64

WinXP Pro
Delphi 2 Pro, Delphi 4 Pro, Delphi 7 Pers, Delphi 2005 Pers, Delphi 2005 Pro
BeitragVerfasst: Sa 15.12.07 22:02 
hab ne Lösung gefunden, gibt ne kleine Komponente die man dazu zweckentfremden kann, werde am Montag kurz posten wie Sie heißt.

Gruß Martin
msickel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 64

WinXP Pro
Delphi 2 Pro, Delphi 4 Pro, Delphi 7 Pers, Delphi 2005 Pers, Delphi 2005 Pro
BeitragVerfasst: So 16.12.07 21:26 
hier gibts die besagte Komponente

delphiarea.com/products/assistant/


Martin
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: So 16.12.07 21:35 
Kannst du noch kurz erklären, wie du die zweckentfremdest? ^_^ Machst du dein Programm als Animation oder wie oder was?

EDIT: Ah mit diesen CustomBalloons wahrscheinlich.
EDIT2: Ich würd gern die Blasenform ausschalten, sodamit ich ein Popup-Menü basteln kann. Von wo aus geht denn die Form aus? Ich finde keine Zeichenroutine dafür :-|
EDIT3: Ah, okay, da sind die Einstellungen: oaBaloon.pas, TBalloonMetrics.Create, da kann man runde Ecken ausschalten.

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)