Re: Transparent Container?
- From: "Mike Williams" <mike@xxxxxxxxxxxxxxxxx>
- Date: Thu, 10 Aug 2006 18:54:00 +0100
"Ken Halter" <Ken_Halter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:OwU0ACKvGHA.4460@xxxxxxxxxxxxxxxxxxxxxxx
You [AppleBag] can't set the label backstyle = transparent?
How come? Text doesn't show?
It's because his Label is in a Frame control Ken, and he is making the Frame
transparent so that it shows the underlying Form image and he is effectively
punching "non transparent holes" into the Frame's transparent area in order
to display the controls it contains (including his Label). The problem with
that (for Labels) is when VB draws a transparent Label it draws the
container's background colour (or background image) first at that position
and then draws the Label caption on top of it using a FontTransparent of
True. This works fine when the transarent Label is on the Form of course (or
on some other non transparent container), but it doesn't work in this
specific case because VB uses the Frame's background before drawing the
Label's caption text (because the Frame is its cpntainer), and therefore his
Label (with BackStyle set to Transparent) will actually appear on the
otherwise transparent Frame as though the Label's background colour was the
same as the Frames colour and as though the Label was not transparent.
That's why I suggested he should simply fail to punch the "non transparent
rectangle" at the Label's position (so that the underlying Form image would
be visible at that point) and to draw the Label's Caption text directly onto
the Form, initially using the Print method for simplicity but later changing
it to use the DrawText API.
Mike Williams (MVP - Visual Basic)
.
- Follow-Ups:
- Re: Transparent Container?
- From: Ken Halter
- Re: Transparent Container?
- References:
- Transparent Container?
- From: AppleBag
- Re: Transparent Container?
- From: Ken Halter
- Re: Transparent Container?
- From: AppleBag
- Re: Transparent Container?
- From: Rick Rothstein
- Re: Transparent Container?
- From: AppleBag
- Re: Transparent Container?
- From: Rick Rothstein
- Re: Transparent Container?
- From: AppleBag
- Re: Transparent Container?
- From: AppleBag
- Re: Transparent Container?
- From: AppleBag
- Re: Transparent Container?
- From: AppleBag
- Re: Transparent Container?
- From: Rick Rothstein \(MVP - VB\)
- Re: Transparent Container?
- From: AppleBag
- Re: Transparent Container?
- From: Rick Rothstein \(MVP - VB\)
- Re: Transparent Container?
- From: Rick Rothstein \(MVP - VB\)
- Re: Transparent Container?
- From: AppleBag
- Re: Transparent Container?
- From: Ken Halter
- Transparent Container?
- Prev by Date: How to detect the presense of the .NET framework...
- Next by Date: Query the type of EXE
- Previous by thread: Re: Transparent Container?
- Next by thread: Re: Transparent Container?
- Index(es):
Relevant Pages
|