PDA

Click to See Complete Forum and Search --> : getSystemFontCollection (put into combobox)


kovan
Jan 3rd, 2004, 05:30 PM
private void getSystemFontCollection(ComboBox systemFonts)
{
try
{
InstalledFontCollection ifc = new InstalledFontCollection();
FontFamily[] ffs = ifc.Families;

foreach(FontFamily ff in ffs)
{


systemFonts.Items.Add(ff.Name);

}
}
catch(Exception msg)
{
MessageBox.Show(msg.Message, "Failed to load the system fonts", MessageBoxButtons.OK, MessageBoxIcon.Error);
}

}