Get list of installed fonts

Use this board to post your code snippets - tips and tricks
10 posts Page 1 of 1
Contributors
MANSQN
VIP - Donator
VIP - Donator
Posts: 159
Joined: Sat Sep 17, 2011 11:33 pm

Get list of installed fonts
MANSQN
Requirements: 1 list box and 1 button:

Go to the code page and add the following declaration:
Code: Select all
Imports System.Drawing.Text
Get Fonts Button Code:
Code: Select all
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim fonts As New InstalledFontCollection

 

        For Each one As FontFamily In fonts.Families

            ListBox1.Items.Add(one.Name)

        Next

 

    End Sub
User avatar
Code
VIP - Donator
VIP - Donator
Posts: 51
Joined: Sun Sep 18, 2011 7:25 pm

Re: Get list of installed fonts
Code
Just a little tip, instead of having a button grab the list why not have it display the list on the form load up? :P
viewtopic.php?f=17&p=54101#p54101
Image
Image
Image
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: Get list of installed fonts
mandai
The code for this has been posted recently. You should clear the list if you want to re-use the function.
User avatar
RunarM
Hardcore Programmer
Hardcore Programmer
Posts: 508
Joined: Wed Nov 18, 2009 11:33 pm

Re: Get list of installed fonts
RunarM
You can also preview the fonts with a label:
Code: Select all
Dim fontname As String = ListBox1.SelectedItem
        Label1.Font = New System.Drawing.Font(fontname, 10)
Just another day in my life.
http://www.codexvideos.com
User avatar
Agust1337
Coding God
Coding God
Posts: 2456
Joined: Fri Feb 19, 2010 8:18 pm

Re: Get list of installed fonts
Agust1337
Yes, these installed fonts have been posted few times this month
You're crazy!
I'm not crazy, my mother had me tested. ~Sheldon Cooper
User avatar
Danny
VIP - Donator
VIP - Donator
Posts: 621
Joined: Sat Oct 30, 2010 8:21 pm

Re: Get list of installed fonts
Danny
This is just a copy of the programm I made -___-
User avatar
Axel
Coding God
Coding God
Posts: 1928
Joined: Sun Jun 27, 2010 9:15 pm

Re: Get list of installed fonts
Axel
How the fk is this a copy ? How else would YOU do it ?? also did YOU invent that code ? certainly not
http://vagex.com/?ref=25000
User avatar
Danny
VIP - Donator
VIP - Donator
Posts: 621
Joined: Sat Oct 30, 2010 8:21 pm

Re: Get list of installed fonts
Danny
Axel wrote:
How the fk is this a copy ? How else would YOU do it ?? also did YOU invent that code ? certainly not
viewtopic.php?f=71&t=7198
User avatar
Axel
Coding God
Coding God
Posts: 1928
Joined: Sun Jun 27, 2010 9:15 pm

Re: Get list of installed fonts
Axel
I'll repeat myself
Did YOU invent the code ? Did you write the InstalledFontCollection ?
http://vagex.com/?ref=25000
User avatar
M1z23R
VIP - Donator
VIP - Donator
Posts: 622
Joined: Tue Sep 28, 2010 4:55 pm

Re: Get list of installed fonts
M1z23R
himeji-jo wrote:
This is just a copy of the programm I made -___-
You are right, you already posted this same thing a week ago :)
10 posts Page 1 of 1
Return to “Quick Snips”