如何一次性设置程序的所有的窗体上面的字体呢? 如何一次性设置程序的所有的窗体上面的字体呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 FontDialog fd = new FontDialog(); DialogResult dr = fd.ShowDialog(); if (dr == DialogResult.OK) { this.Font = fd.Font; this.toolStrip1.Font = fd.Font; this.toolStrip2.Font = fd.Font; } 看了,如果是webform的话,可以写到css里面,在页面代码中调用样式就可以了。 void ChangFontSize(Form f,int size){f.Font = new System.Drawing.Font("宋体", size);foreach (Control c in f.Controls){ c.Font = new System.Drawing.Font("宋体", size);}} C# imageList控件导入图片失真问题 .net 2.0 下,可否使用DotNetSpeech.dll? 简单正则 有答案立即结贴 第三方控件DXPerience的一些控件问题2 如何实现自己的 StructureToPtr 和 PtrToStructure 关于打印的小问题 想输入客户名称,模糊查询出客户列表 在vs2005中如何建ashx文件 我的苦恼,谁来帮帮忙啊! c#初学者,哪位有电子版的书给两本 这段代码是什么意思? 传对象
FontDialog fd = new FontDialog();
DialogResult dr = fd.ShowDialog();
if (dr == DialogResult.OK)
{
this.Font = fd.Font;
this.toolStrip1.Font = fd.Font;
this.toolStrip2.Font = fd.Font;
}
{
f.Font = new System.Drawing.Font("宋体", size);
foreach (Control c in f.Controls)
{
c.Font = new System.Drawing.Font("宋体", size);
}
}