sharpshell
sharpshell copied to clipboard
Deskband transparency issue
Version of SharpShell used: 2.7.1 ... How to get transparency working? I set BackColor: Transparent but it isn't working.
Hey there,
sorry no one answered yet. I'm gonna try to help you.
What do you want to make transparent? Any details? Maybe a picture? What color does it show when you set it to transparent? What OS do you use Windows 10?
I also have this problem. Here is my code (win10 1803):
// BandService
protected override BandOptions GetBandOptions() {
return new BandOptions {
HasVariableHeight = false,
IsSunken = false,
ShowTitle = true,
Title = "CPU Mem",
UseBackgroundColour = false,
AlwaysShowGripper = true
};
}
// UI
this.BackColor = System.Drawing.Color.Transparent;
this.Controls.Add(this.label_Mem);
this.Controls.Add(this.label_CPU);
this.label_Mem.BackColor = System.Drawing.Color.Transparent;
this.label_CPU.BackColor = System.Drawing.Color.Transparent;
// ...
@antti202 I just have seen that if I set the UserControl's background to black and set the UseBackgroundColour BandOptions to false, it will work well!
But there is another problem. I use StartIsBack which is used to change the windows taskbar theme, and the transparent will have a wrong priority.
Hi @Countryen - I've also experienced this bug. I'm using Windows 10 and SharpShell v2.7.2.
I was able to work around it using instructions that @Aoi-hosizora gave: set BackColor
to Black
and set UseBackgroundColour
to false
.
This is confusing behaviour. I expect that either a) setting UseBackgroundColour
and setting BackColor
to Transparent
or b) not setting UseBackgroundColour
would set the background of the UserControls to be transparent.
I used the code that you end up with at the end of the DeskBand tutorial to generate this.
Let me know if you need any more information or screenshots - I'm happy to help out.
Hey @apuchitnis, thanks for asking but I am not the author and never had this issue, I was just asking for more information to help out :) So either you meant to ask the author of the issue or you could close this, if this works. Or what do you mean? Sorry I've been very inactive for a while.
Hey @Countryen - sorry, perhaps I wasn't clear enough. To confirm - am I right in understanding that you're a maintainer of this project?
My intention was to continue the original author's thread and add more information about this bug, so that we can find a proper fix rather than a workaround.