Well I was doing this setting the TransparencyKey same as BackColor, but doesn't makes totally transparent, here a pic:
How to make the form totally transparent to set the BackgroundImage a transparent Back-Colored .png?
Hope someone could help me (I've had this doubt for so long)
Thanks.
The TransparencyKey should be a color on the background image, not a color on the form itself. So you can't set the TransparencyKey to the form's BackColor since the form is not its own background image.
It's been a very long time I read it but I'll post a reference link as I've found it. It's on MSDN, I believe.
Related
i'm coming with you cause i've a problem with a PNG transparency over a transparent Form in C#.
i don't know how this problem is called, but i've take you a screen : https://i.ibb.co/xj37y7M/Capture.png.
For my main for, i've just applied a TransparencyKey with the same color as it own background.
For my picture it doesn't had any background.
Thank a lot for your help !
I created a PNG with a transparent background. If I set my button control to have that image as a background, I see grey where I should be seeing the form it is set on. I set BackColor for the button to transparent, but to no avail.
How can I make it work right?
I have a transparent form in C# and on top of the form I have a splashscreen picturebox with an image. The form's backcolor is actually just Control gray. I also just set the form's transparencykey to Control gray as well. I used the tutorial here to make the form transparent: How to design a cool semi transparent splash screen?
The image is stretched over the picturebox to make it fit nicely on all computer screen resolution. Here is the original image, notice that it has a transparent left side with squares which does not have any borders.
OriginalImageInPhotoshop
However afterwards, the form has these ugly borders on the left side of the image that are the same color as the backcolor & transparencykey (in this case, Control gray). If I place the form over a black background, you can quite visibly see this. How can I get rid of this?
Problem
So far, only remedies I have found is to either not have the image set to stretch in the picturebox (but that would cause it to appear different on every computer screen!) or perhaps theres another way to make a form transparent...
I have a transparent form, on which I need to place a semi-transparent panel. I've gotten the panel to be semi-transparent relative to the form's color, but whenever I set the form to transparent, that semi transparency stops working. It seems it is only blending the color with the color of the control behind it, but when the form is transparent it doesn't do so with any windows that may be behind the form.
Is there any way this can be achieved? I'm not sure if I should be overwriting the form's paint method, the control's, or both.
Any help is appreciated! Thanks!
In Win Form, we can create non-rectangular forms by creating a bitmap that have a background color like blue. So, we can set it to background image of Win Form and with change TransparencyKey option to blue, we have a shaped-window.
So, my question is What is the equivalency to TransparencyKey in WPF that does like Win Form's TransparencyKey?
Thanks for your attention :)
There is no equivalent.
Just use an image with transparent areas (so it has to be a PNG or GIF), set the WindowStyle to None, set the window's background to Transparent, and set AllowTransparency to true.
Transparent areas will not be clickable.
Set AllowTransparency to true then use pixel shader effect library for wpf.
Use this link for more details about how to use pixel shader : Green screen in wpf