FontOptions Property (ACommonDialog)

Returns or sets the options for the Font dialog box.

Syntax

Object.FontOptions [ = enFontOptions ]

The FontOptions property syntax has the following parts:

 

Name

Type

Description

Object

ACommonDialog

ACommonDialog object

enFontOptions

enumACommonDialogFontOptions

An integer specifying the options for the Font dialog box.

Where

enumACommonDialogFontOptions can be one of the following:

 

Name

Value

Description

acdlgFontOptionsANSIOnly

0x00000400

ANSI Only. Limits font selections to all scripts except those that use the OEM or Symbol character sets.

acdlgFontOptionsApply

0x00000200

Causes the dialog box to display the Apply button.

acdlgFontOptionsBoth

0x00000003

Causes the dialog box to list the available printer and screen fonts.

acdlgFontOptionsEffects

0x00000100

Causes the dialog box to display the controls that allow the user to specify strikeout, underline, and text color options.

acdlgFontOptionsFixedPitchOnly

0x00004000

Causes the dialog box to display only fixed pitch fonts.

acdlgFontOptionsForceFontExist

0x00010000

Specifies that the dialog should return an error condition if the user attempts to select a font or style that does not exist.

acdlgFontOptionsLimitSize

0x00002000

Specifies that the dialog should select only font sizes within the range specified by the FontSizeMin and FontSizeMax properties.

acdlgFontOptionsNoFaceSel

0x00080000

No Face Selection. Prevents the dialog box from displaying an initial selection for the font name combo box.

acdlgFontOptionsNoSimulations

0x00001000

Specifies that the dialog should not allow graphics device interface (GDI) font simulations.

acdlgFontOptionsNoSizeSel

0x00200000

Prevents the dialog box from displaying an initial selection for the font size combo box.

acdlgFontOptionsNoStyleSel

0x00100000

Prevents the dialog box from displaying an initial selection for the font style combo box.

acdlgFontOptionsNoVectorFonts

0x00000800

Specifies that the dialog should not allow vector font selections.

acdlgFontOptionsPrinterFonts

0x00000002

Causes the dialog box to list only the fonts supported by the printer associated with the device context.

acdlgFontOptionsScalableOnly

0x00020000

Specifies that the dialog should allow only the selection of scalable fonts. Scalable fonts include vector fonts, scalable printer fonts, TrueType fonts, and fonts scaled by other technologies.

acdlgFontOptionsScreenFonts

0x00000001

Causes the dialog box to list only the screen fonts supported by the system.

acdlgFontOptionsTTOnly

0x00040000

Specifies that the dialog should allow only the selection of TrueType fonts.

acdlgFontOptionsWYSIWYG

0x00008000

Specifies that the dialog should allow only the selection of fonts available on both the printer and the display. If this flag is specified, the acdlgFontOptionsBoth and acdlgFontOptionsScalableOnly flags should also be specified.

Comments

More than one Font option may be selected with the use of an OR expression.

Example

The following statement changes the font options of the ACommonDialog to fixed pitch only:

cdlg1.FontOptions=acdlgFontOptionsFixedPitchOnly OR acdlgFontOptionsLimitSize

Applies to

ACommonDialog

See Also

Font, FontName, FontSize, FontSizeMax, FontSizeMin