Home

Fonts in a Combo Box

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim colFonts As InstalledFontCollection = New InstalledFontCollection
        Dim fontFamilies() As FontFamily = colFonts.Families
        Dim i As Integer

        For i = 0 To fontFamilies.Length - 1 Step 1
            Me.cboFonts.Items.Add(fontFamilies(i).Name)
        Next

        Me.cboFonts.Text = "Times New Roman"
End Sub

Home Copyright © 2005-2012 FunctionX