Connecting Tech Pros Worldwide Forums | Help | Site Map

Retrieving a list of available fonts on system.

Jonesgj
Guest
 
Posts: n/a
#1: Apr 20 '06
Hi,


How would I return a list of available fonts. I'm writing a simple word
processor, and have got the font dialog working, but wanted to create a
toolbar dropdown with a list of fonts in, instead.

I'm not a 'hardened programmer' ;-) so any simple examples out there??

Thanks in antipation

jonesG



james
Guest
 
Posts: n/a
#2: Apr 20 '06

re: Retrieving a list of available fonts on system.



"Jonesgj" <a@b.com> wrote in message news:YeednZhQhY9ga9rZRVny1g@bt.com...[color=blue]
> Hi,
>
>
> How would I return a list of available fonts. I'm writing a simple word
> processor, and have got the font dialog working, but wanted to create a
> toolbar dropdown with a list of fonts in, instead.
>
> I'm not a 'hardened programmer' ;-) so any simple examples out
> there??
>
> Thanks in antipation
>
> jonesG
>[/color]

VB2005 code:


For Each FNT In FontFamily.Families

ComboBox1.Items.Add(FNT.Name)

Next



This will loop thru and display all of the Fonts on your system. But, not
True Type Fonts.

james







Herfried K. Wagner [MVP]
Guest
 
Posts: n/a
#3: Apr 20 '06

re: Retrieving a list of available fonts on system.


"Jonesgj" <a@b.com> schrieb:[color=blue]
> How would I return a list of available fonts. I'm writing a simple word
> processor, and have got the font dialog working, but wanted to create a
> toolbar dropdown with a list of fonts in, instead.[/color]

\\\
Imports System.Drawing
..
..
..
For Each fntfam As FontFamily In FontFamily.Families
Console.WriteLine(fntfam.Name)
Next fntfam
///

<URL:http://dotnet.mvps.org/dotnet/samples/controls/#FontList>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Jonesgj
Guest
 
Posts: n/a
#4: Apr 21 '06

re: Retrieving a list of available fonts on system.


Thanks James and Hefried.

Best wishes

Jonesgj


"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:eL5$nsMZGHA.4144@TK2MSFTNGP04.phx.gbl...[color=blue]
> "Jonesgj" <a@b.com> schrieb:[color=green]
>> How would I return a list of available fonts. I'm writing a simple word
>> processor, and have got the font dialog working, but wanted to create a
>> toolbar dropdown with a list of fonts in, instead.[/color]
>
> \\\
> Imports System.Drawing
> .
> .
> .
> For Each fntfam As FontFamily In FontFamily.Families
> Console.WriteLine(fntfam.Name)
> Next fntfam
> ///
>
> <URL:http://dotnet.mvps.org/dotnet/samples/controls/#FontList>
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://classicvb.org/petition/>[/color]


Closed Thread