Jump: Search:

Total Visual SourceBook

Total Visual SourceBook CD and Printed Manual

Microsoft Access 2007/2010 Version
is Shipping!

New features in Total Visual SourceBook for Access, Office 2007 and VB6

Supports Access/Office 2010 (32 bit), 2007, 2003, 2002, 2000, and
Visual Basic 6.0!

Also available for:
Access 97/95


View all FMS products for Microsoft AccessAll Our Microsoft Access Products

SourceBook Info:

Why SourceBook?

 

"The code is exactly how I would like to write code and the algorithms used are very efficient and well-documented."

Van T. Dinh, Microsoft MVP

 

 

 

 

 
Royalty free source code library modules for Microsoft Access, VB6, VBA, OfficeRoyalty free source code library modules for Microsoft Access, VB6, VBA, OfficeVBA and VB6 Source Code Library Download the free trial version of Total Visual SourceBook for Microsoft Access, Office, VB6 and VBA
Category: General VBA/VB6 : Windows Common Dialogs
Description: Displaying Windows Common Dialogs for Colors, Files, Folders, Fonts, Printers, and Page Setup

Class: CFontDialog

Displaying the Font Common Dialog without using the Microsoft Common Dialog Control

Procedure Name

Type

Description

(Declarations) Declarations Declarations and private variables for the CFontDialog class
Color Property Gets the font color
Flags Property Sets the flags for the dialog. The Flags property can have the following values: FonScreenFonts - Causes the dialog to display only the available screen fonts. FonPrinterFonts - Causes the dialog to display only the available printer fonts. FonBoth = Causes the dialog to display both screen and printer fonts. FonShowHelp - Unsupported in this class FonEnableHook - Unsupported in this class FonEnableTemplate - Unsupported in this class FonEnableTemplateHandle - Unsupported in this class FonInitToLogFontStruct - Causes the dialog to be initialized with the values specified in the LOGFONT type. FonEffects - Causes the dialog to show additional that allow the user to specify strikeout, Underline, and Color. FonApply - Unsupported in this class FonNoVectorFonts - Prevents the user from selecting vector fonts. FonNoOEMFonts - Same as FonNoVectorFonts FonNoSimulations - Prevents the dialog from using font simulations. FonLimitSize - Causes the dialog to limit font size selections to the range specified in the Min and Max properties. FonFixedPitchOnly - Forces the user to select fixed pitch fonts. FonWYSIWYG - Causes the dialog to display on those fonts available on both the screen and printer. FonForceFontExist - Causes the dialog to raise an error if the user tries to select a font that does not exist. FonScalableOnly - Causes the dialog to allow only the selection of scalable fonts. FonTTOnly - Causes the dialog to allow only the selection of true type fonts. FonNoFaceSel - Prevents the dialog from initially displaying a selection for the font name. FonNoStyleSel - Prevents the dialog from initially displaying a selection for the font style. FonNoSizeSel - Prevents the dialog from initially displaying a selection for the font size. Multiple flags can be specified using the following syntax: FontDialog.Flags = FonNoStyleSel Or FonNoSizeSel
Font Property Gets a Font object representating the selections made in the Font dialog This property should be used with the Set syntax. For example: Set FontDialog.Font = mFont You must use the FonInitToLogFontStruct flag for these settings to work.
FontType Property Gets the font type. The FontType property can have one or more of the following values: FonSimulated - The font is simulated. FonPrinter - The font is a printer font. FonScreen - The font is a screen font. FonBold - The font is bold. FonItalic - The font is italic. FonRegular - The font is not bold.
hWndParent Property Sets the parent hWnd. This can be a handle to any vlaid window.
Max Property Sets the current maximum font size. You must use the FonLimitSize flag for this property to work.
Min Property Sets the current minimum font size. You must use the FonLimitSize flag for this property to work.
Style Property Sets the font style. If the FonUseStyle flags is specified, the style combo is initialized to the value of this property. When the dialog closes, this property contains the user's selection.
Class_Initialize Initialize Set initial values to defaults which may be overridden with property settings
HeightToPoints Private Converts a font height to a font point size. The font height is measured in logical device units. Most windows API functions for dealing with fonts require the font height in logical units. This function only works correctly in the MM_TEXT mapping mode.
PointsToHeight Private Converts a font point size to a font height (in pixels). The font height is measured in logical device units. Most windows API functions for dealing with fonts require the font height in logical units. This function only works correctly in the MM_TEXT mapping mode.
Show Method Displays the font common dialog

Overview of Total Visual SourceBook

The source code in Total Visual SourceBook includes modules and classes for Microsoft Access, Visual Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily add this professionally written, tested, and documented royalty-free code into your applications to simplify your application development efforts.

Additional Resources

Feedback

Contact Us  l   Web questions: Webmaster   l   Copyright © FMS, Inc., Vienna, Virginia
Celebrating our 26th Year of Software Excellence