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 !
Related
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...
How can I have an image without background on a winforms application.
So that you only can see the image, without a form or something.
I now tried to set the Background Color and Transparency key to the same color but that results to this:
I also search the web but I didn't found really usefull answers...
So is there another way to do this?
Thanks in advance
Try using png with transparency for image and real transparency for the form by overriding CreateParams to allow transparency.
Provlem on your screenshot is caused by mixing original background color with image. After mixing the color doesn't match transparency key, so you get such border.
The other solution can be to draw the image having no transparency without scaling and antialiasing.
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!
I have Form1 which contains has background image with error message and with some buttons and shows up when some error happens. I have to make part of the Form1 transparent while the other part will contain an error message and it will be nontransparent. Here's some illustration.
The grey part of the Form1 must be say, 80% transparent. How can I achieve it?
So far I've tried to play with Opacitybut it makes the whole frame transparent. Please help me out of this I really need to make this today, Thanks a lot.
set BackColor and TransparencyKey same color
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.