Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

a WinForm application which is not influenced by ClearType global settings

I have a main Form (WinForm) which should render its content without ClearType. More precisely, a RichTextBox within that form should render its text without ClearType. When ClearType is turned on at the end-user system, how can I prevent it from affecting my application?

I havn't found how to achieve this with System.Drawing, nor I know of a P/Invoke solution.

like image 611
Bohoo Avatar asked Nov 15 '22 06:11

Bohoo


1 Answers

I don't know how to set it but you can check from

  int x = System.Windows.Forms.SystemInformation.FontSmoothingType; 
//x=1 when SmoothingType is Standard
//x=2 when SmoothingType is ClearType
like image 177
Javed Akram Avatar answered Dec 28 '22 23:12

Javed Akram