谁能告诉我如何设置 FontDialog 的默认字体名称、字体大小、字体颜色……;
FontDialog dlg = new FontDialog();
dlg.ShowColor = true;
if (dlg.ShowDialog() != DialogResult.OK) return;
dlg.ShowDialog();方法应该显示我选择的“microsoft san serif”字体名称
最佳答案
您只需在调用 ShowDialog
之前设置 Font
属性。
例如:
dlg.Font = new Font("Consolas", 10);
//or
dlg.Font = myCurrentlySelectedFont;
关于c# - 在 C# 中更改默认字体对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9498924/