您的位置:首页 > 编程语言 > C#

黄聪:C#获取系统中的所有字体

2010-03-27 19:03 274 查看
private void button1_Click(object sender, EventArgs e)
{
StringBuilder str = new StringBuilder(2000);
System.Drawing.Text.InstalledFontCollection fonts = new System.Drawing.Text.InstalledFontCollection();
foreach (System.Drawing.FontFamily family in fonts.Families)
{
str.Append(family.Name);
str.AppendLine();
}
textBox1.Text = str.ToString();
textBox1.Focus();
textBox1.SelectAll();
}

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: