Name

FontDialog Class

Namespace

System.Windows.Forms

Createable

Yes

Description

Represents a common dialog box for selecting or saving a font.

The FontDialog object has properties for setting the initial appearance and functionality of the dialog box, a property for returning the font selected by the user, as well as a method for showing the dialog box.

Selected FontDialog Members

The following provides a brief description of the more important members of the FontDialog class:

Color property

Sets or retrieves the color of the font. The return value is an instance of the Color structure. The Color structure has a number of members, among which are:

  • Over 140 named color properties, from Red, Green, and Blue, to PapayaWhip, MistyRose, and MediumSeagreen. These properties return a Color structure.

  • A Name property, which returns the name of the color or its ARGB value for custom colors. (The A component is the alpha component of the color, which determines the color’s opacity.)

  • The R property, G property, and B property, which return a byte specifying the red, green, or blue color component of the RGB color value, respectively.

  • The IsKnownColor, IsNamedColor, and IsSystemColor properties, which give information about the color. Please see the documentation for more information on these properties.

Font property

Sets or retrieves the font chosen by the user. The return value is an instance of the Font class in the System.Drawing namespace. The Font class has a number of members, among which ...

Get VB .NET Language in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.