Get list of installed fonts
Use this board to post your code snippets - tips and tricks
10 posts
Page 1 of 1
Requirements: 1 list box and 1 button:
Go to the code page and add the following declaration:
Go to the code page and add the following declaration:
Code: Select all
Get Fonts Button Code:
Imports System.Drawing.Text
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
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
The code for this has been posted recently. You should clear the list if you want to re-use the function.
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
http://www.codexvideos.com
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
I'm not crazy, my mother had me tested. ~Sheldon Cooper
How the fk is this a copy ? How else would YOU do it ?? also did YOU invent that code ? certainly not
Axel wrote:How the fk is this a copy ? How else would YOU do it ?? also did YOU invent that code ? certainly notviewtopic.php?f=71&t=7198
I'll repeat myself
Did YOU invent the code ? Did you write the InstalledFontCollection ?
Did YOU invent the code ? Did you write the InstalledFontCollection ?
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
Copyright Information
Copyright © Codenstuff.com 2020 - 2023