tags:

views:

265

answers:

2
+2  Q: 

Sidebar form

How can I create a Sidebar form in delphi.

I try the ScreenSnap and Align properties but I need that the form stay visible even if the user maximize other forms, without been on top. Just like the windows sidebar do.

update from the comments: if a window is maximized it maximizes next too the window, not in front of or behind.

Thanks

A: 

You can call a Windows API function to force your application to stay on top:

SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
Kluge
Thanks for the feedback. I Already try setting the FormStyle property to fsStayOnTop (I think that make the same as the code you posted). But i need that the form stay visible without been on top of others like the taskbar on windows or the sidebar in vista.
Marioh
@Marioh: No, the API function I mentioned is NOT the same as setting the FormStyle to fsStayOnTop. As you have discovered, setting the FormStyle doesn't work. Calling the API function DOES work.
Kluge
@Kluge: He is looking for docking, not stay on top. His question was unclear.
Jim McKeeth
Thanks for the clarification @Jim. I thought this question sounded too easy.
Kluge
+6  A: 

What you're looking for is called an AppBar. Begin your research with the ShAppBarMessage API function.

Rob Kennedy