vb

(VB .Net): Using Local Font Files

vblover_programmer

vblover programmer

Posted on November 22, 2024

(VB .Net): Using Local Font Files
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
Enter fullscreen mode Exit fullscreen mode
๐Ÿ’– ๐Ÿ’ช ๐Ÿ™… ๐Ÿšฉ
vblover_programmer
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.

Related

ยฉ TheLazy.dev

About