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

时间:2010-11-09 03:45:42

标签: .net winforms fonts gdi+ cleartype

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

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

1 个答案:

答案 0 :(得分:1)

我不知道如何设置它,但你可以从

查看
  int x = System.Windows.Forms.SystemInformation.FontSmoothingType; 
//x=1 when SmoothingType is Standard
//x=2 when SmoothingType is ClearType