Tuesday, March 1, 2011

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

From stackoverflow
  • 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);
    
    Marioh : 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.
    Kluge : @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.
    Jim McKeeth : @Kluge: He is looking for docking, not stay on top. His question was unclear.
    Kluge : Thanks for the clarification @Jim. I thought this question sounded too easy.
  • What you're looking for is called an AppBar. Begin your research with the ShAppBarMessage API function.

0 comments:

Post a Comment