Font Dialog Box
Dialog boxes consist of a title bar , an optional main instruction , various controls in the content area , and commit buttons . The Font dialog box lets the user choose attributes for a logical font, such as font family and associated font style, point size, effects , and a script.

The following VB.Net program invites a Font Dialog Box and retrieve the selected Font Name and Font Size.
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim dlg As New FontDialog dlg.ShowDialog() If dlg.ShowDialog = Windows.Forms.DialogResult.OK Then Dim fontName As String Dim fontSize As Integer fontName = dlg.Font.Name fontSize = dlg.Font.Size MsgBox(fontName & " " & fontSize) End If End Sub End Class
Related Topics
- Visual Studio IDE
- How to Create a vb.net Windows Forms Application
- Label Control
- Button Control
- TextBox Control
- ComboBox Control
- ListBox Control
- Checked ListBox Control
- RadioButton Control
- CheckBox Control
- PictureBox Control
- ProgressBar Control
- ScrollBars Control
- DateTimePicker Control
- Treeview Control
- ListView Control
- Menu Control
- MDI Form
- Color Dialog Box
- OpenFile Dialog Box
- Print Dialog Box
- KeyPress event in VB.NET
- How to create Dynamic Controls in VB.NET ?
- How do i keep a form on top of others
- Timer Control - VB.Net