Transparent Labels

P

Philip Gray

Hello all,

Think I posted on this subject before, but I'm still none the wiser so here
we go again.

I've been trying to apply transparent backgrounds to labels and panels on my
form, and even after applying sp2, I'm still having issues.

I have a series of 240x268 panels and I want to drop a picturebox behind
them all and have it show through - no joy.

I've also tried creating a panel with a picturebox in it and positioning
labels over the top of it, then changing the label backcolor to transparent
using the following code:
Me.Label8.BackColor = System.Drawing.Color.Transparent

and still the label shows up as white! Whats even stranger is that the
background color for the form is not even white - its silver. Where is
white being inherited from?

Can anyone shed any light on this because its driving me nuts... I just want
to put a pretty picture at the back of my form and have it show through the
labels above it.

How hard can this be? Am I missing something obvious? Surely it must be
possible, or are all of my pocketpc apps destined to look like helloworld
projects? I can only use vb.net for this - can it be done? Can anyone
provide me code, or a link, or anything?

Please!?!?
 
C

Chris Tacke, eMVP

Transparency has been covered pretty extensively, so I'd start with
searching the archives for the efforts and experiences of those who've been
here before. The short of it is that you can't do a transparent panel or
label, but you can direct draw text on an image to get the effect.

-Chris
 
M

Mark Johnson

As allready stated this has be answered before, unfortunatly I have lost the
answer given
by Serg Kuryata MS (20040202) - which is a pity since it explained a lot.

Basicly the answer was that the functions (here transparent backgrounds
Labels/TreeView) are only
supported in Framework when the System it is running on also support this.

SP2 supports transparent backgrounds, but it does not work with
Labels/TreeView on Pocket PC 2002,
but does work with a ListView (which did not work on SP1). Certain other NET
device it will work.

As for Labels, I tried LinkLabels (which is also not supported on Compact),
but found C# source at
http://www.intelliprog.com/downloads/LinkLabel_Setup.exe which is used when
running on Compact.
No.

Hope this helps

Mark Johnson, Berlin Germany
(e-mail address removed)
 
E

Elisa

Hi,

According to MS, transparency is not supported. Altough the word
"transparent" is probably one of the top five keywords in this
newsgroup, MS still believes no-one needs it.

So what is the solution? Create your own custom controls to replace any
of the existing controls supplied with the .NET CF. Sounds impossible?
Well, it is, but luckily, there are a lot of third-party replacement
controls available already, e.g. the Smart Device Framework is a great
source of existing controls, and a great source of inspiration to create
your own controls. (www.opennet.cf)


Regards,

Elisa
 
P

Philip Gray

Thanks to everyone who replied - you've confirmed my deepest fears!

I'm going to go off now and cry into my cornflakes while tring to work out
how this "direct draw" business works and how much extra code this is going
to take me!

I don't want to slag off the framework here, because I think its a pretty
good piece of compact engineering - but it does upset me rather a lot!
(xpath, xslt, transparent labels etc)

Thanks again, all.
 

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