Preventing minimizing using Show Desktop

Posted on 2007-10-02
Last Modified: 2013-12-04
I have an AppBar window in my application. I want it to be Visible also when user minimizes all Windows using shortcut Windows+M (or Windows + D) or Show Desktop button in Quick Lunch toolbar.

Preventing minimizing when user uses those keyboard shortcuts is quite simple and needs receiving WM_SIZE message, I think. But I have no idea how can I have my AppBar visible when user clicks Show Desktop button. I know that Show Desktop first minimize all windows and then change Z-Order to get Desktop Window as a front window. I've read some solutions (like changing application parent window to Progman) but none of them works. I use one application (not mine) that behaves exactly like I need - stays visible all the time and it's also AppBar window.

Your solution?
Question by:JacekH
    LVL 19

    Accepted Solution

    the trick is like you say, setting the app parent window to program manager.

    I've tested this here and it works:

    procedure TForm14.Button1Click(Sender: TObject);
     Windows.SetParent(Handle, FindWindow(nil, 'Program Manager'));

    be aware that this is a kind of hackisch way, there is no 'official' way of achieving this.

    Author Comment

    Well, I don't know why it didn't worked on another computer I've tested last night. Now it works... So thank you, your solution is accepted.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Can I legally transfer my OEM version of Windows to another PC?  (AKA - Can I put a new systemboard in my OEM PC?) Few of us are both IT and legal experts but we all have our own views of Microsoft's licensing rules and how they apply.  There are…
    Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now