WinForm应用程序,不受ClearType全局设置的影响

Boh*_*hoo 5 .net fonts gdi+ cleartype winforms

我有一个主窗体(WinForm),它应该呈现其内容没有ClearType.更确切地说,该表单中的RichTextBox应该呈现其没有ClearType的文本.在最终用户系统上打开ClearType时,如何防止它影响我的应用程序?

我没有找到如何使用System.Drawing实现这一点,也不知道P/Invoke解决方案.

Jav*_*ram 1

我不知道如何设置,但你可以查看

  int x = System.Windows.Forms.SystemInformation.FontSmoothingType; 
//x=1 when SmoothingType is Standard
//x=2 when SmoothingType is ClearType
Run Code Online (Sandbox Code Playgroud)