Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prevent transparent labels from BOLDING under XP 1

Status
Not open for further replies.

awaresoft

Programmer
Feb 16, 2002
373
DE
VFP 8 and 9: I'm sure you've all seen this behavior: On XP transparent labels will start to get bolder and Bolder and BOLDER as various form elements are updated.

One workaround is to subclass your labels as follows:

Code:
  * prevent bleeding
  Backstyle   = 1  && opaque
  ColorSource = 1  && form's Color Scheme
  Style       = 4  && Themed Background only

This fixes the problem _BUT_ eliminates the ability to have transparent labels :(

Has anyone discovered a workaround to this problem that permits the use of transparent labels without the unintentional bolding effect?

Note: The following techniques do not fix this problem:
- Disabling themes (_Screen.Themes = .F.)
- ThisForm.Draw()
- ThisForm.Paint()

ThisForm.Refresh() temporarily corrects the problem - but this seems like an expensive solution (and how to know when to trigger this?)

Ideas appreciated!

Malcolm
 
Solution: Toggling offscreen bitmaps off and then on again seems to magically correct this behavior.

Code:
sys(602,0) && disables off-screen bitmaps
sys(602,1) && re-enables off-screen bitmaps

Just disabling off-screen bitmaps (without the toggle) seems to also work. But, in searching the UT archives, I've seen many posts expressing concern about VFP's screen update behavior when off-screen bitmaps are disabled.

Any comments on this solution? I'm wondering if anyone can confirm my findings? I'm also interested in hearing about any downsides to this approach.

Malcolm
 
I've seen the symptoms, when developing on my laptop - using the TFT screen, I always thought it was a function of that.

I'll try your suggestion for the worst forms, here's a star for updating your original post with a workaround!

Ta

Regards

Griff
Keep [Smile]ing
 
I found this problem only with Arial font.
If you use Arial, consider using/testing a different one.

Maci Flaviu
VFP 9
 
Griff,

Thanks for the star - I hope its earned as the jury is still out on my posted solution.

Interesting observation about the TFT display as I do most of my development and testing on a laptop. Perhaps this behavior could be linked to Microsofts' new laptop font technology (can't remember what MS calls their new font technology that anti-aliases fonts on TFT displays)?

Thanks for joining this thread!

Malcolm
 
Maci Flaviu (FlamFox),

Interesting observation about the Arial font. Yes, that is the font I use most often. I'll see if this makes a difference.

Thanks for joining this thread!

Malcolm
 
Neil,

Yes - ClearType was the term I was looking for. I wonder if the wierd bolding that happens with XP themed labels and checkboxes is related to ClearType?

I've put this on my todo list to check out in more detail.

Thanks for pointing me in the right direction!

Malcolm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top