Have you ever wanted a combo box in your WinForms application that listed all the available fonts on the computer where it was running? Below, you’ll find a simple script to do do just that.
Private Sub AddAllFonts() Using grph As Graphics = Me.CreateGraphics For Each fntfam As FontFamily In FontFamily.GetFamilies(grph) ComboBox1.Items.Add(fntfam.Name) Next End Using End Sub
All Things DotNet Discussed – Winforms/ASP.Net/SharePoint/WPF
Leave a reply
You must be logged in to post a comment.