Click here to Skip to main content
15,947,411 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hey everyone

This should be simple to answer.

I used a few online services to generate loading bars with transparent backgrounds.

But they are not transparent on the form.

If you would like to see my problem, i used,animatedCircle[^]

Please do not change this to "Removed commercial advertising" as people need to see the problem for themselves

How can i make this work?

Updated 29-Mar-13 1:48am
bbirajdar 29-Mar-13 7:59am    
You need to send an email to and ask them..
[no name] 29-Mar-13 8:18am    
no. how will they know about vb design?
ZurdoDev 29-Mar-13 8:14am    
Post relevant code. How else can we help?
[no name] 29-Mar-13 8:18am    
there is no code. it's design work.
bbirajdar 29-Mar-13 8:20am    
If there is no code, then what does it has to do with vb in your comment above ?

1 solution

It doesn't work because you're seeing the background of the picturebox. The image may be transparent, but the picturebox is not.

In Windows Forms apps, controls are not "transparent". If you set the BackColor of a control to "Transparent", it doesn't make the control transparent. The control will actually use the BackColor and Background image properties of of control that contains it, matching them. This gives the ILLUSION of transparency. The problem with this is if the PictureBox is sitting over text in the parent control, you won't see the text "come through" the PictureBox because that's not part of the container controls background.

In order to get this to work, you'll have to make your own control, probably deriving from PictureBox and control the painting yourself. One of thing you'll have to do is to override the OnPaintBackground method and have it do nothing at all.

Kind of like this[^].
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900