Reputation: 40726
While there are several questions about how to make a WinForms ProgressBar
control transparent, I am facing the opposite:
I.e. I am having a WinForms form (called from an Add-in Express Outlook add-in) that contains a progress bar.
On Windows 7, everything looks fine, but on Windows XP, the progress bar's background seems to shine through (as you can see in the screenshot).
One special thing is that the FormBorderStyle
property of the form is set to None
.
My question is:
Does anyone know the reason for this (unwanted) transparency and how to get rid of it?
Update/solution:
Thanks to John's answer I figured out that the form's TransparencyKey
property was set to some strange value. After clearing it altogether, it works like a charm:
Upvotes: 2
Views: 1769
Reputation: 38079
Your transparency key is set to the background color of the control. Change it to a color you will not use, such as magenta.
Upvotes: 2