471,313 Members | 1,988 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,313 software developers and data experts.

Translucent form, opaque text.

As far as I know if I change the form's opacity, every control on the
form also inherits that opacity. But in many real applications (not
application programs), we see opaque text (100% opacity) on a
traslucent background, for example text messages on TV. Or look at the
title bar text of Aero. Background is translucent but the text is
opaque.

Is it possible to use 100% opaque text on a traslucent form?
Jul 22 '08 #1
3 4876
On Mon, 21 Jul 2008 17:38:10 -0700, Sin Jeong-hun <ty*******@gmail.com>
wrote:
As far as I know if I change the form's opacity, every control on the
form also inherits that opacity. But in many real applications (not
application programs), we see opaque text (100% opacity) on a
traslucent background, for example text messages on TV. Or look at the
title bar text of Aero. Background is translucent but the text is
opaque.

Is it possible to use 100% opaque text on a traslucent form?
Are you using Forms? WPF?

And, have you tried setting the text opacity explicitly? What happens
when you do?
Jul 22 '08 #2
On Jul 22, 9:41*am, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
On Mon, 21 Jul 2008 17:38:10 -0700, Sin Jeong-hun <typing...@gmail.com*
wrote:
As far as I know if I change the form's opacity, every control on the
form also inherits that opacity. But in many real applications (not
application programs), we see opaque text (100% opacity) on a
traslucent background, for example text messages on TV. Or look at the
title bar text of Aero. Background is translucent but the text is
opaque.
Is it possible to use 100% opaque text on a traslucent form?

Are you using Forms? *WPF?

And, have you tried setting the text opacity explicitly? *What happens *
when you do?
C# 2.0 forms. As far as I know Windows controls don't have opacity
property but only form does. If I set a form's opacity to 50%, then
the label text's opacity also becomes 50%. I tried to get the form's
DC, and draw text using GDI operations with a color whose A value is
255, but that also didn't work. That A value seemed to be proportional
to the opacity of the form.
Thanks.
Jul 22 '08 #3
On Mon, 21 Jul 2008 17:52:04 -0700, Sin Jeong-hun <ty*******@gmail.com>
wrote:
C# 2.0 forms. As far as I know Windows controls don't have opacity
property but only form does. If I set a form's opacity to 50%, then
the label text's opacity also becomes 50%.
Right, as documented in the Form.Opacity property doc page.

I don't know anything off the top of my head that would allow you to
override that. It seems to me that the property is by design always going
to affect the entire contents of the form.

With a lot of work, you could probably reimplement the opacity stuff, but
giving yourself finer control over the opacity of the contents.

It's possible I'm just missing something...maybe someone else will have
some better ideas.

Pete
Jul 22 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Lloyd Dupont | last post: by
reply views Thread by UJ | last post: by
reply views Thread by yogi | last post: by
reply views Thread by shachar8 | last post: by
11 posts views Thread by Ajith Menon | last post: by
scubak1w1
3 posts views Thread by scubak1w1 | last post: by
5 posts views Thread by Prisoner at War | last post: by
27 posts views Thread by Nate Eldredge | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.