By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,241 Members | 2,072 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,241 IT Pros & Developers. It's quick & easy.

Non-transparent labels

P: n/a
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
Nov 15 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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

"Steve Barnett" <no****@nodomain.com> wrote in message
news:u4**************@TK2MSFTNGP09.phx.gbl...
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


Nov 15 '05 #2

P: n/a
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

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:ul*************@tk2msftngp13.phx.gbl...
| 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
|
| "Steve Barnett" <no****@nodomain.com> wrote in message
| news:u4**************@TK2MSFTNGP09.phx.gbl...
| > 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
| >
| >
|
Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.