I've got a simple function for you that always works (I use it a lot), you
only have to
fill in as parameter the handle of the window and if it should be "Always on
top" or not.

[CODE}
Function SetOnTop(Wnd : hWnd;
                  OnTop : Boolean) : Boolean;
Begin
  If OnTop Then
    Result := SetWindowPos(Wnd, HWND_TOPMOST, 0, 0, 0, 0,
                           SWP_NOMOVE Or SWP_NOSIZE)
  Else
    Result := SetWindowPos(Wnd, HWND_NOTOPMOST, 0, 0, 0, 0,
                           SWP_NOMOVE Or SWP_NOSIZE);
End;
[/CODE]

Greetz,

Peter

> -----Original Message-----
> From: [email protected]
> [mailto:[EMAIL PROTECTED] Behalf Of delphionly1
> Sent: Friday, April 15, 2005 1:48 PM
> To: [email protected]
> Subject: Re: [delphi-en] Stay On Top form
>
>
>
> At www.Torry.net I found a component there that will help you
> Search for it. there.
>
> ----- Original Message -----
> From: "Michał Woźniak" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Friday, April 15, 2005 12:44 PM
> Subject: Re: [delphi-en] Stay On Top form
>
>
>
> Dnia piątek, 15 kwietnia 2005 10:16, aryan salamnpour napisał:
>
> > I want to create a form on my application that has an Always on Top
> > property.
> > [snip]
>
> fsFormOnTop is not enough, you will have to mess with CreateParams here.
>
> Search on this on http://delphi.about.com
> I got it running based on the information from there.



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to