Autor Beitrag
Sebo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34



BeitragVerfasst: Sa 14.02.04 02:02 
Hi Leute
kennt jemand eine Möglichkeit, wie ich ein Delphiformular die ganze Zeit über "ontop <> obendrauf" über allen anderen Anwendungen halte?
Thx Sebo

Hab zwar was gefunden - dass ist aber eher unschön. Gibts da ne bessere Mmöglichkeit?
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
with Self do
  SetWindowPos(Handle,
               HWND_TOPMOST,
               Left,
               Top,
               Width,
               Height,

               SWP_NOACTIVATE or SWP_NOMOVE or SWP_NOSIZE);

und das Ganze in einen Timer.

Moderiert von user profile iconPeter Lustig: Code- durch Delphi-Tags ersetzt
patrick
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1481

WIN2k, WIN XP
D6 Personal, D2005 PE
BeitragVerfasst: Sa 14.02.04 14:14 
hi sebo,
im objektinspektor für das form gibt es die eigenschaft "formstyle".
wenn du diese auf "fsStayOnTop" setzt bleibt dein forum immer im hintergrund.
wenn du den wert nach "fsNormal" umstellst ist alles wieder ganz normal (wie der name ja schon sagt) :D

CU

_________________
Patrick
im zweifelsfall immer das richtige tun!!!
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 14.02.04 16:27 
Was ist an SetWindowPos unschön? Und warum soll das ständig in einem Timer passieren? Einmal genügt.
rokdd
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 329

Win XP
D6
BeitragVerfasst: Sa 14.02.04 17:49 
hallo,
bei fsstaytop ist folgendes zu beachten: wenn du ein anderes formular auch als fsstaytop "eingestellt" hat, wird das alte von dem neuem überdeckt.
vielleicht hilft dir auch sowas wie Showmodal???

Meine hinweise sind nicht für jeden nützlich, aber ich weiß ja auch nciht was du tun willst(und warum)!
(willst du zum bsp andere programme oder deine eigenen forms überblenden?)


rokdd

PS: Ist der Titel nicht missverständlich "fixieren"?

[Edit:PS angefügt]
Sebo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34



BeitragVerfasst: Sa 14.02.04 19:35 
fixieren heißt in diesem Fall, dass das Formular imemr den höchsten Rang bei der Überlappung hat, also immer ganz oben steht.

Wenn ich das ohne Timer machen, wird es wieder überdeckt, wenn ich eine andere Anwednung anklicke!!!

Das Formular das oben drauf liegt enthält einen Button, mit dem man ein Ereignis immer auslösen kann.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 14.02.04 20:22 
Sebo hat folgendes geschrieben:
Wenn ich das ohne Timer machen, wird es wieder überdeckt, wenn ich eine andere Anwednung anklicke!!!

Nein. Und wenn, dann machst du was falsch bei SetWindowsPos.
ixtreme
Gast
Erhaltene Danke: 1



BeitragVerfasst: Sa 14.02.04 20:35 
normal sollte es gehen wenn du es in oncreate deines forms schreibst


ixtreme.de
Sebo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34



BeitragVerfasst: Sa 14.02.04 20:38 
ich hab die setwindowpos routine in das onshow ereignis der form4 geschrieben und es wird gandenlos überdeckt!!!
ixtreme
Gast
Erhaltene Danke: 1



BeitragVerfasst: Sa 14.02.04 20:41 
dann machst du wohl was falsch...
Sebo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34



BeitragVerfasst: Sa 14.02.04 20:42 
sonst muss ich ja nix verändern oder?
Sebo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34



BeitragVerfasst: Sa 14.02.04 20:44 
komisch bei einem ganz nuen formular gehts

vielleicht liegt es daran das es nicht das hauptformular ist bzw es von form1 gezeigt wurde und form1 nur versteckt wird ...
sehr komisch
das sinddie eigenschaften meines formulars:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
object Form4: TForm4
  Left = 192
  Top = 107
  BorderStyle = bsNone
  Caption = 'Form4'
  ClientHeight = 28
  ClientWidth = 104
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  OnClose = FormClose
  OnKeyPress = FormKeyPress
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13


Moderiert von user profile iconPeter Lustig: Code- durch Delphi-Tags ersetzt
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 14.02.04 23:16 
"Unterformulare" kan man nicht alwaysontop setzen.
Sebo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34



BeitragVerfasst: So 15.02.04 15:53 
wenn ichs in einen timer mach dann gehts
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: So 15.02.04 16:13 
Luckie hat folgendes geschrieben:
"Unterformulare" kan man nicht alwaysontop setzen.

Was meinst du mit Unterformulare kann man nicht alwaysontop setzen..? Bei meinem X-Spy hat jedes Listen-Fenster ein eigenes Such-Fenster und dieses Such-Fenster ist (sofern "seine Liste aktiv ist) immer AlwaysOnTop.. wird eine andere Liste oder das Haupt-Fenster aktiviert verliert es seinen AlwaysOnTop-Status wieder...

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!