Non-transparent labels

S

Steve Barnett

I've got a form on which there is a picture box with a picture in it.

On top of that I place two labels and make their backgrounds transparent.
What I expect to see is the picture showing through behind the labels, but
what I actually get is the background of the labels painted in the
background colour of the form.

Can I have "transparent" labels over a picture box? I've done this many
times in my VB days and don't see why it should be a problem in C#, other
than the fact that I must be missing something fundamental here.

Thanks
Steve
 
D

Dmitriy Lapshin [C# / .NET MVP]

Steve,

You can try to specify the picture box as the parent for these labels. I
remember I have seen something like this replied to a similar question in
these newsgroups. If this fails, do the Google Groups search - most likely
you're not the first to ask this question, and in all probability the
solution has already been posted by someone.
 
S

Steve Barnett

I did a quick search and found some potential solutions, none of which
seemed to work. In the end, I set the background of the form to the content
of the picture box and made the picture box invisible. That seemed to work
and will do for my purposes.

Thanks,

Steve

in message | Steve,
|
| You can try to specify the picture box as the parent for these labels. I
| remember I have seen something like this replied to a similar question in
| these newsgroups. If this fails, do the Google Groups search - most likely
| you're not the first to ask this question, and in all probability the
| solution has already been posted by someone.
|
| --
| Dmitriy Lapshin [C# / .NET MVP]
| X-Unity Test Studio
| http://x-unity.miik.com.ua/teststudio.aspx
| Bring the power of unit testing to VS .NET IDE
|
| | > I've got a form on which there is a picture box with a picture in it.
| >
| > On top of that I place two labels and make their backgrounds
transparent.
| > What I expect to see is the picture showing through behind the labels,
but
| > what I actually get is the background of the labels painted in the
| > background colour of the form.
| >
| > Can I have "transparent" labels over a picture box? I've done this many
| > times in my VB days and don't see why it should be a problem in C#,
other
| > than the fact that I must be missing something fundamental here.
| >
| > Thanks
| > Steve
| >
| >
|
 

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