How do I?

  • Thread starter Thread starter Bob
  • Start date Start date
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
 
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'.
 
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.
 
Back
Top