Articles   Members Online: 3
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to turn off Windows' font anti-aliasing Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
30-Aug-02
Category
System
Language
Delphi 2.x
Views
45
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Tomas Rutkauskas

How can I temporally turn off the Windows font anti-aliasing and turn it on after 
drawing?

Answer:

1   unit Unit1;
2   
3   interface
4   
5   uses
6     Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
7   
8   type
9     TForm1 = class(TForm)
10      procedure FormCreate(Sender: TObject);
11      procedure FormDestroy(Sender: TObject);
12    private
13      SmoothFonts: Boolean;
14    public
15    end;
16  
17  var
18    Form1: TForm1;
19  
20  implementation
21  
22  {$R *.DFM}
23  
24  procedure TForm1.FormCreate(Sender: TObject);
25  begin
26    SystemParametersInfo(SPI_GETFONTSMOOTHING, 1, @SmoothFonts, 0);
27    if SmoothFonts then
28      SystemParametersInfo(SPI_SETFONTSMOOTHING, 0, nil, SPIF_UPDATEINIFILE);
29  end;
30  
31  procedure TForm1.FormDestroy(Sender: TObject);
32  begin
33    if SmoothFonts then
34      SystemParametersInfo(SPI_SETFONTSMOOTHING, 1, nil, SPIF_UPDATEINIFILE);
35  end;
36  
37  end.


Under Win95 it has only an effect if the Plus! Pack is installed (NT4 by default).

			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC