How do I?

B

Bob

Got a picture control that contains a bitmap. I want to have a label control
located over it with some text that I can change dynamically, but I do not
want the background of ther label to appear. That is, I only want to see the
text itself overlaid over the picture. I tried to set the backcolor to
Transparent in the web colors but this does not seem to work. It's a winform
app in VS2003, VB.Net.

Thanks for any help.
Bob
 
H

Herfried K. Wagner [MVP]

Bob said:
Got a picture control that contains a bitmap. I want to have a label
control located over it with some text that I can change dynamically, but
I do not want the background of ther label to appear. That is, I only want
to see the text itself overlaid over the picture.

You may want to handle the picturebox' 'Paint' event and draw the string
there using 'e.Graphics.DrawString'.
 
C

Chris Dunaway

Herfried solution is probably the best, but when you place your label
on the picture pox, make sure that the label's parent is the picture
box and not the form. Then the transparent color should work
correctly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top