How can I prevent another program from showing a thumbnail preview in the taskbar?

Raymond Chen

A customer wanted to prevent the Contoso app from showing a thumbnail preview when the user hovers over it in the taskbar. They wrote something like this:

HWND h = FindWindow(TEXT("ContosoMainWindow"), NULL);
BOOL fTrue = TRUE;
    &fTrue, sizeof(fTrue));

They reported that this works for most applications, but if the target is Contoso, then it stops working when Contoso is minimized. They wanted to know if this is expected, and if there is any other way to prevent Contoso from showing a thumbnail preview.

Manipulating the windows of other applications is generally a rather dodgy undertaking. Sometimes you get away with it, sometimes you don’t. And even if you get away with it today, it may stop working tomorrow.

In this case, what happens is that you are changing the configuration of Contoso’s window, and then after you do that, Contoso reconfigures their window in a way you don’t like. I suspect Contoso enables a custom thumbnail on minimize so that they can show a prettier thumbnail than the default thumbnail.

It’s like saying, “I don’t like it when my neighbor keeps his gardening tools next to his shed, so I went into his yard and moved them to behind the shed. But every time he finishes gardening, he puts his tools next to the shed again. How do I make sure my neighbor always puts his gardening tools behind the shed instead of next to it?”

Answer: You can’t. They’re not your gardening tools nor your yard. If you sneak into his yard and move his gardening tools, it’s unreasonable to expect that they will stay where you moved it.

What you can do is have a talk with your neighbor and explain why you would prefer that he keep his gardening tools behind the shed. Maybe you can come to some sort of agreement. The customer should talk to the Contoso support team to see if there’s a policy or other setting for the Contoso app to suppress the thumbnail preview.


Comments are closed. Login to edit/delete your existing comments

  • M. W. 0

    In my experience, talking with people rarely works; I’ve filed countless bug-reports for various programs and websites and reported countless fraudulent listings on eBay and so on, but they usually just they end up being ignored or rejected. Unfortunately, most of the time, the only way to get things done is to just burn down the shed. 🤷

    • Mystery Man 0

      … at which point the police would arrest and incarcerate you for arson. Rumor has it that in the American prison, other prisoners forcibly reconfigure your face, the painful way.

      On a more serious note, when more than one developer rejects your bug reports, it is high time you realized there is something wrong with your reports.

      • Joshua Hudson 0

        Microsoft rejects bugs because they don’t want to put in the effort. This means your test is poor. Elsewhere I get better response rate and actual fix rate. But sometimes it just doesn’t get fixed. I remember this one where the musl-libc developers and the glibc developers were each telling the other they were wrong about what a library function should do.

        • Jonathan Harston 0

          I’ve had arguments like that.
          min(x,y) should return the smallest value.
          What if they’re equal? I’ve had arguments over whether a=1; b=1; c=min(a,b); should return a or b.

          • Joshua Hudson 0

            if (vfork() == 0) { setuid(2); exec(…); } dreadlocks on musl long. I submitted a one line patch that was rejected. Then the musl and glibc devs argued over whether or not that sequence is defined.

          • cheong00 0

            Easy. Just let them supply their own compare function to it. The choice of “<" and "<=" will enable them to decide whether to return a or b.

            At least that's how LINQ solved this kind of problem.

          • Neil Rashbrook 0

            Then there’s positive and negative zero…

          • Bwmat 0

            Does that ‘min’ take in and return references? Otherwise why would it matter?

        • Marc K 0

          It seems like outsourced support reps are either incentivized to close cases or are penalized for letting an issue get escalated. It’s very frustrating when it’s so obvious the rep’s goal is to discard my case as fast as possible. Then some teams are happy to let cases languish forever. I’ve got one case with a firewall vendor that’s been open almost a year now because they deemed a satisfactory work-around is to delete all of the rules and re-renter them by hand from scratch. Still others dump everything they can, even bugs, into an “enhancement database” that no one looks at. I do interact with a few vendors that care about fixing bugs in their products, and it’s a refreshing experience.

      • Bwmat 0

        Your second paragraph is quite naive.

Feedback usabilla icon