Display font collection in the list box using C#.Net.

Hi,
This code will list all the font collection in a list box


/*Importing the namespace*/
using System.Drawing.Text;
using System.Collections;

private button1_Click(Object sender,EventArgs E)
{
/* Creating the instance of the InstalledFontCollection Class*/

InstalledFontCollection ifc=new InstalledFontCollection();
IEnumerator ie;
ie=ifc.Famlies.GetEnumerator();
while(ie.MoveNext())
{
listbox1.Items.Add(ie.Current.toString());
}


}

Regards
S.S.Bajoria


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: