Installed Font Collection in Your System : System Font « GUI « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Development
8.Event
9.File Directory
10.Generics
11.GUI
12.Language Basics
13.LINQ
14.Network Remote
15.Security
16.Thread
17.Windows Presentation Foundation
18.Windows System
19.XML
20.XML LINQ
VB.Net Tutorial
VB.Net by API
VB.Net » GUI » System FontScreenshots 
Installed Font Collection in Your System
Installed Font Collection in Your System

Imports System
Imports System.ComponentModel
Imports System.Windows.Forms
Imports System.Data
Imports System.Configuration
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Drawing.Text
Imports System.Globalization
Imports System.Text
Imports System.Collections

Public Class MainClass
    Shared Sub Main()
        Dim myform As Form = New FontFamiliesForm()
        Application.Run(myform)
    End Sub
End Class


Public Class FontFamiliesForm
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is NothingThen
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents groupBox2 As System.Windows.Forms.GroupBox
    Friend WithEvents installedFamiliesListBox As System.Windows.Forms.ListBox
    Friend WithEvents groupBox1 As System.Windows.Forms.GroupBox
    Friend WithEvents familiesListBox As System.Windows.Forms.ListBox
    Friend WithEvents splitter1 As System.Windows.Forms.Splitter
    <System.Diagnostics.DebuggerStepThrough()Private Sub InitializeComponent()
        Me.groupBox2 = New System.Windows.Forms.GroupBox()
        Me.installedFamiliesListBox = New System.Windows.Forms.ListBox()
        Me.groupBox1 = New System.Windows.Forms.GroupBox()
        Me.familiesListBox = New System.Windows.Forms.ListBox()
        Me.splitter1 = New System.Windows.Forms.Splitter()
        Me.groupBox2.SuspendLayout()
        Me.groupBox1.SuspendLayout()
        Me.SuspendLayout()
        '
        'groupBox2
        '
        Me.groupBox2.Controls.AddRange(New System.Windows.Forms.Control() {Me.installedFamiliesListBox})
        Me.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill
        Me.groupBox2.Location = New System.Drawing.Point(1390)
        Me.groupBox2.Name = "groupBox2"
        Me.groupBox2.Size = New System.Drawing.Size(153310)
        Me.groupBox2.TabIndex = 5
        Me.groupBox2.TabStop = False
        Me.groupBox2.Text = "Installed Font Families"
        '
        'installedFamiliesListBox
        '
        Me.installedFamiliesListBox.Dock = System.Windows.Forms.DockStyle.Fill
        Me.installedFamiliesListBox.IntegralHeight = False
        Me.installedFamiliesListBox.Location = New System.Drawing.Point(316)
        Me.installedFamiliesListBox.Name = "installedFamiliesListBox"
        Me.installedFamiliesListBox.Size = New System.Drawing.Size(147291)
        Me.installedFamiliesListBox.TabIndex = 0
        '
        'groupBox1
        '
        Me.groupBox1.Controls.AddRange(New System.Windows.Forms.Control() {Me.familiesListBox})
        Me.groupBox1.Dock = System.Windows.Forms.DockStyle.Left
        Me.groupBox1.Location = New System.Drawing.Point(30)
        Me.groupBox1.Name = "groupBox1"
        Me.groupBox1.Size = New System.Drawing.Size(136310)
        Me.groupBox1.TabIndex = 3
        Me.groupBox1.TabStop = False
        Me.groupBox1.Text = "Font Families"
        '
        'familiesListBox
        '
        Me.familiesListBox.Dock = System.Windows.Forms.DockStyle.Fill
        Me.familiesListBox.IntegralHeight = False
        Me.familiesListBox.Location = New System.Drawing.Point(316)
        Me.familiesListBox.Name = "familiesListBox"
        Me.familiesListBox.Size = New System.Drawing.Size(130291)
        Me.familiesListBox.TabIndex = 0
        '
        'splitter1
        '
        Me.splitter1.Name = "splitter1"
        Me.splitter1.Size = New System.Drawing.Size(3310)
        Me.splitter1.TabIndex = 4
        Me.splitter1.TabStop = False
        '
        'FontFamiliesForm
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(513)
        Me.ClientSize = New System.Drawing.Size(292310)
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.groupBox2, Me.groupBox1, Me.splitter1})
        Me.Name = "FontFamiliesForm"
        Me.Text = "FontFamiliesForm"
        Me.groupBox2.ResumeLayout(False)
        Me.groupBox1.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub FontFamiliesForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgsHandles MyBase.Load
        Dim family As FontFamily
        For Each family In FontFamily.Families
            If family.IsStyleAvailable(FontStyle.Bold= False Then Exit For

            familiesListBox.Items.Add(family.Name)
        Next family

        Dim installedFonts As InstalledFontCollection = New InstalledFontCollection()
        For Each family In installedFonts.Families
            installedFamiliesListBox.Items.Add(family.Name)
        Next family

    End Sub
End Class

           
       
Related examples in the same category
1.Get Installed Font and display one by oneGet Installed Font and display one by one
2.Display All font installed in your systemDisplay All font installed in your system
3.List Installed FontsList Installed Fonts
4.Font Properties in Bigger Font sizeFont Properties in Bigger Font size
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.