有关Windows应用程序(C#),是可以调整整个应用程序(包括所有形式)来使用系统字体设置大小,而不是使用固定大小?
For a windows application (C#), is it possible to adjust the entire application (including all forms) to use system font settings for size rather than using fixed sizes?
这是为视力受损的用户谁设置各自的机器上更大的字体大小。是否有可能为应用程序根据什么用户调整字体。
This is for users with visual impairment who have set a bigger font size on their machines. Is it possible for the application to adjust the font according to what the user has.
推荐答案在你的形式构造(前调用的InitializeComponent()),我会尝试设置你的表格等于Font属性 System.Drawing.SystemFonts.DefaultFont 。如果您的控件(例如:文本框)不指定特定的字体那么我相信他们从父容器(即形式)继承其字体属性。
In the constructors of your forms (before calling InitializeComponent()), I would try setting the Font property of your forms equal to System.Drawing.SystemFonts.DefaultFont. If your controls (ex: textboxes) don't specify a specific font then I believe they inherit their font properties from their parent containers (i.e. forms).
在 System.Drawing.SystemFonts 类。您可能要调查这些进一步的为好。
There are other more specific system fonts (like the default setting for the Caption's font) in the System.Drawing.SystemFonts class. You may want to investigate those further as well.
更多推荐
如何使用系统字体设置为Windows C#应用程序
发布评论