Autor Beitrag
bbfan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164



BeitragVerfasst: Mo 25.06.07 10:48 
Hallo!

Ich versuche ein Fenster (Form2), welches beim Starten der Anwendung mit .show sichtbar gemacht wird, permanent sichtbar zu machen. Der Weg über "FormStyle" - fsStayOnTop klappt nicht.
Es bleibt einfach nicht im Vordergrund und wird sofort von anderen Fenstern überlagert.

Wie könnte man das Problem lösen?

Viele Grüße,
BBFAN
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Mo 25.06.07 10:50 
ausblenden Delphi-Quelltext
1:
form.showMODAL					

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
5M17H
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164

XP, Vista32, bald auch Vista64
PHP(3/5), Delphi(2), Java(1), C(3), C#(1)
BeitragVerfasst: Mo 25.06.07 10:52 
Ich habe mir ein Sicherheitsprogramm geschrieben -nicht sehr gut aber genug für das was ich brauchte- und das ist wie folgt aufgebaut

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure TForm1.FormCreate(Sender: TObject);
begin
  Form1.BorderStyle := bsNone; //keine ränder anzeigen
  Form1.WindowState := TWindowState(wsMaximized); //form auf bildschirmgröße
  Form1.FormStyle := fsStayOnTop; //immer im vordergrund blieben
end;


und dann noch

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm1.Timer1Timer(Sender: TObject);
var
  WindowHandle: Cardinal;
begin
  WindowHandle := FindWindow('#32770', 'Windows Task-Manager');
  if WindowHandle <> 0 then
    SendMessage(WindowHandle, WM_CLOSE, 0, 0);
  Form1.FormStyle := fsStayOnTop;
end;


Und es klappt. Bis auf "Windowstaste+D" da gehts weg. KA wie man das sperrt.
bbfan Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164



BeitragVerfasst: Mo 25.06.07 10:56 
das problem ist, dass form2 immer sichtbar sein soll , ich aber in Form1 noch eingaben machen muss.
Mit showModal komme ich da nicht weiter, da ja dann form1 blockiert ist.

Das mit dem Timer werde ich mal ausprobieren, allerdings denke ich, dass form1 damit den Focus verliert. Das könnte nerven wenn man gerade eine Eingabe macht und der Fokus auf form2 geht.
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Mo 25.06.07 10:58 
was genau hast du vor?
vllt kann man das ganze besser lösen
evtl. kannst nen screenshot machen..

LG
Stefan

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 25.06.07 11:00 
Moin!

Ich hatte auch mal so einen Thread, kuckst du. ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
bbfan Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164



BeitragVerfasst: Mo 25.06.07 11:43 
vielen Dank Narses! Das war die Lösung. Jedesfall war der erste Test erfolgreich!!!