(VB .Net): Using Local Font Files
vblover programmer
Posted on November 22, 2024
Imports System.Drawing.Text
Public Class Form1
Dim Collection As New PrivateFontCollection
Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles Me.Load
For Each File As String In IO.Directory.GetFiles(".\Fonts", "*.ttf")
Collection.AddFontFile(File)
Next
Me.Font = New Font(Collection.Families(0), 12, FontStyle.Bold)
Me.Label2.Font = New Font(Collection.Families(1), 12, FontStyle.Bold)
End Sub
End Class
๐ ๐ช ๐
๐ฉ
vblover programmer
Posted on November 22, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.