473,395 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to disable font smooting/anti-aliasing on winform's controls

Lok
11
Hai everybody, is there someways to accomplish this things? I saw a Delphi source that can solve this problem. Try to make it on C#.net version, but won't work (using Font.ToLogFile(), and call to GDI32's CreateFontIndirect()).

Here's the Delphi source:

Expand|Select|Wrap|Line Numbers
  1. procedure TForm1.DisableFontSmoothing(LabelName: TLabel);
  2. var
  3.   tagLOGFONT: TLogFont;
  4. begin
  5.   GetObject(LabelName.Font.Handle, SizeOf(TLogFont), @tagLOGFONT);
  6.   tagLOGFONT.lfQuality  := NONANTIALIASED_QUALITY;
  7.   LabelName.Font.Handle := CreateFontIndirect(tagLOGFONT);
  8. end;
  9.  
  10. procedure TForm1.Button1Click(Sender: TObject);
  11. begin
  12.   DisableFontSmoothing(Label2);
  13. end;
  14.  
Any help will be appreciated, thanks..

Regards,

Lok
Nov 14 '06 #1
0 1104

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: David Rwj Cherry CS2000 | last post by:
is there any way to disable or lock vertical scroll bars on a browser window? im a newbie and i just don't want them to appear on my screen. sometimes they appear on IE but not on mozilla. any...
2
by: Mike | last post by:
I am trying to retrieve (from unmanaged code) the font information from windows within a .NET application using SendMessage( hEnd, WM_GETFONT, 0, 0 ).. However the return value is NULL every...
1
by: | last post by:
Is there any way i can disable Font Style and Size Section that comes on Font Dialog Box.
2
by: tottigang | last post by:
Hi, I have a tabstrip and I have some tabs in it. On the first page, all the tabs are enabled, I need to disbale part of the tabs at a specific point in the application and again enable them. I...
6
by: Mika M | last post by:
Hi! I'm trying to print barcodes paper printings of my VB .NET (2003) Windows forms application. Earlier I used Code39.TTF (True Type Font) with VB6, and it was working fine, but now can't get...
5
by: Ike | last post by:
Does anyone know how to disable a list box element in VB 6 ? Thanks Ike
1
by: =?Utf-8?B?UEFSQVNBTQ==?= | last post by:
I changed the fonts in my computer to CLEAR TYPE. I am not able to switch back to TRUE TYPE. How can I do this?
0
by: Alexander Vasilevsky | last post by:
Can to disable/enable smoothing font in the WPF? http://www.alvas.net - Audio tools for C# and VB.Net developers
43
by: Andy Mabbett | last post by:
I'm about to publish (what's the web equivalent of "reprint"?) an old paper article, whose heading is in this font: <http://www.flickr.com/photos/pigsonthewing/2446437162/> Can anyone kindly...
8
by: Arhaus | last post by:
I was wondering if someone could help me out. I am new to jscript and I need to modify a calendar onclick event. We have a calendar which displays the dates either in green or red based upon data...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.