Label Transparency

Started by Robert Dunn, July 05, 2010, 01:49:41 AM

Previous topic - Next topic

Robert Dunn

Hello evrybody,

I think I have what seems to be a very easy question, Hopefully the answer will be the same...

I have put some labels onto a from, and set them to transparent.  The labels on the left hand side seem to be transparent.
However, the labels on the right hand side do not seem to be transparent.  The form has a fading effect on the right hand side (towards the edges).

All Labels look to be OK except the ones that are placed in the  fading effect, Like they are drawn from the base color of the form, but the label did not get the fade effect.

I did set the properties to transparent, and went so far as to go into Window Styles for this control, and placed a check in: WS_EX_Transparent. This also does not seem to help.

Am I missing something here?  Or is transparent really not transparent?

Thanks,

Robert

Rolf Brandt

#1
Yes, there seems to be a problem. See this link:

http://www.planetsquires.com/protect/forum/index.php?topic=2406.msg18620#msg18620

I am not sure if the BitBlT function might help here. I never did much in graphic programming.
Rolf Brandt
http://www.rbsoft.eu
http://www.taxifreeware.com
I cook with wine, sometimes I even add it to the food.
(W. C. Fields)

Paul Squires

Transaprency was probably not the best word to use when describing the property. I used it because that was the word that Visual Basic used back in the day. Essentially all FF3 is doing is using the background color of the Form as the background color of the Label. If you start to use a bitmap or gradient colors for the Form's background then the Label background is not as easy to determine.
Paul Squires
PlanetSquires Software

John Thompson

Hi,

I ran into this issue with a bitmap background and a label, and was curious if there were any easy fixes around it now.

Thanks!

-John

Israel Vega Alvarez

This code is working fine for me and I am add gradient to background of form.

  Thanks to Richard Kelly in sample: 
http://www.planetsquires.com/protect/forum/index.php?topic=2984.msg22068#msg22068

I am put this code when form is created...in this case in function CONFIGURAR_WM_CREATE:

   
Local ff As FLY_DATA Ptr

   ff = GetProp (HWND_CONFIGURAR_LABEL1, "FLY_PTR")
   @ff.hBackBrush = GetStockObject (%NULL_BRUSH)
   SetProp HWND_CONFIGURAR_LABEL1, "FLY_PTR", ff
   SetBkMode GetDC(HWND_CONFIGURAR_LABEL1), %TRANSPARENT

   ff = GetProp (HWND_CONFIGURAR_LABEL2, "FLY_PTR")
   @ff.hBackBrush = GetStockObject (%NULL_BRUSH)
   SetProp HWND_CONFIGURAR_LABEL2, "FLY_PTR", ff
   SetBkMode GetDC(HWND_CONFIGURAR_LABEL2), %TRANSPARENT





Israel