Seite 1 von 1

always on top

Verfasst: 28.07.2005 20:08
von unix
Kennt jemand ein Befehl das mein kleines Programm (analoge Uhr) immer im Vordergrund zeigt?
Wenn möglich ohne ASM

Verfasst: 28.07.2005 20:12
von Franky
SetWindowPos_(WindowID(#window_about_who),#HWND_TOPMOST,0,0,0,0,#SWP_NOMOVE|#SWP_NOSIZE)

Verfasst: 28.07.2005 20:45
von Pelagio
:allright:
Als Hilfe dieses Codeschnipzel:

Code: Alles auswählen

Procedure WindowFront(WindowID.l, Bool.b)
    Protected X.f, Y.f
    ID_TopMost.b       = -1
    ID_NotTopMost.b    = -2
    SWP_NoSize.b       =  1
    SWP_NoMove.b       =  2
    SWP_NoActivate.b   = 10
    SWP_ShowWindow.b   = 40
        
    X = WindowX(): Y = WindowY()
    Select Bool
        Case #True
            SetWindowPos_(WindowID(WindowID), ID_TopMost, 0, 0, 0, 0, SWP_NoActivate Or SWP_ShowWindow Or SWP_NoMove Or SWP_NoSize)
        Case #False
            SetWindowPos_(WindowID(WindowID), ID_NotTopMost, 0, 0, 0, 0, SWP_NoActivate Or SWP_ShowWindow Or SWP_NoMove Or SWP_NoSize)
    EndSelect
    MoveWindow(X, Y) 

EndProcedure

Verfasst: 28.07.2005 21:40
von mueckerich
das gleich Problem hatte einer im Englischen Forum, schau mal hier nach
:allright: http://forums.purebasic.com/english/vie ... hp?t=16011
Der Code vom letzten Post funktioniert klasse.

Verfasst: 30.07.2005 13:33
von unix
sry die Frage aber was soll bool.b in dein Beispiel sein
<== newbie

[EDIT] habs raus
on top
not on top
richtig?