![]() |
| ||
| Disable font smoothing (Anti-aliased font) This code disables font smoothing for a TLabel component. Can easily be converted for other VCL controls. Loren Soth |
procedure TForm1.DisableFontSmoothing(LabelName: TLabel); var tagLOGFONT: TLogFont; begin GetObject(LabelName.Font.Handle, SizeOf(TLogFont), @tagLOGFONT); tagLOGFONT.lfQuality := NONANTIALIASED_QUALITY; LabelName.Font.Handle := CreateFontIndirect(tagLOGFONT); end; //Example Use for Label2 procedure TForm1.Button1Click(Sender: TObject); begin DisableFontSmoothing(Label2); end;
| All times are GMT -4. The time now is 4:19 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC