Transparent background

Hello.I have a question.I use VC# and I wan' to create a nonrectangular form.I have create the background image with the transparent key: blue, but when I compile the project the application is not transparent!

Answer this question

Transparent background

  • J M B

    Hey there, if you haven't solve this yet, I have an answer that worked with me....

    trying to create a 32 bits image with an Alpha chanel is to dificult... and trying to get the program for that is difficult too. so you can do this...

    1° you need to set the Form.BackColor and the Form.TransparencyKey to the same color.. so when you are running the program, the color you set should be transparent.... you can test this by setting both colors White.. so the textboxes or other cotrols with this backcolor sohuld be trasparent... so now you can have a transparent form..

    2° this step is the most complicated to explain cause you need to fix the image you are going to work with a program that supports multilayers... I have tried the Adobe Photoshop... it works perfectly for this....

    3° when you are creating the image.. you need to set two layers... one transparent layer and the other is where you are going to create your image... the trasparent layer will be set to 100% transparency... and the other, none,..

    4° it's when the thing is getting complicated. the parts of the image you are going to use as transparent, need to be erased so when you do this you should see throuh the layer to the trasparent one... then when you have done this.. you merge the layers. and then save the file as a PNG file cause this is the only that support the alpha channel or in this case.... the transparent layer...

    5° so when you use the file in you aplication you should see throuh the transparent sectors the back color of the form and then when you run the application you should see throuh... and boila!!! you have your trasparent background..

    PS... sorry about my writing I'm not to good with english....

    hope this help


  • cplusplus1

    Are you sure that the color you specified to the TransparencyKey property has the same RGB value as the image you are using for your background

  • Uğur Gümüşhan

    You need to change the color depth of which Your background image or you Windows environment

    If it is the background image... take a look at your save-as options in the program you built the image in, hopefully there will be a way there.



  • Rattlerr

    Only under rare circumstances should an application be modifying the user environment... I’m sorry to say it but you really should focus on making your application work with 32-bit color as it really isn’t that hard.

  • ekekakos

    Yes I am sore.I discovered the problem.I need to change the color depth to 16 bit.At 1024x768 with 32 bit depth I cannot do this.How I can repair this
  • mpco

    I most change the color depth of my Windows environment!!! This is a big problem.When the user launch my application, I cannot tell him: "Hey!Change your color depth to 16 bit because the application is not supporting this!" :-(
  • JohnPrem

    It is hard.I am a beginner.How I make my application working with 32-bit color

  • Transparent background