PlanetSquires Forums

Support Forums => General Board => Topic started by: Robert Dunn on July 05, 2010, 01:49:41 AM

Title: Label Transparency
Post by: Robert Dunn on July 05, 2010, 01:49:41 AM
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
Title: Re: Label Transparency
Post by: Rolf Brandt on July 05, 2010, 03:59:45 AM
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.
Title: Re: Label Transparency
Post by: Paul Squires on July 06, 2010, 08:25:05 AM
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.
Title: Re: Label Transparency
Post by: John Thompson on September 06, 2012, 01:03:46 PM
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
Title: Re: Label Transparency
Post by: Israel Vega Alvarez on September 06, 2012, 01:42:02 PM
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 (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