Font property (Main Control)

Visual Basic example
Visual C++ 4.0 example

Access 2.0 example

Access 95, 97 example
Visual J++ example

Syntax IFontDisp* Font

Overview:  Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the Font object for any text that you draw using the DrawText method.

In Visual Basic, you can set the Font object's properties at design time by double-clicking the Main Control's Font property in the Properties window. At run time, you set these properties as in the following example: Lead1.Font.Name = "Arial".

The Font object has the following properties:

Property

Description

Bold

TRUE for bold text; FALSE for not bold.

Italic

TRUE for italic text; FALSE for not italic.

Name

Text string for name of the font. For example: "Times New Roman".

Size

Size of the font, in points. The maximum value s 2048 points.

StrikeThrough

TRUE for a line through the text; FALSE for no line.

Underline

TRUE for underlined text; FALSE for not underlined.

Weight

Possible runtime values are 400 for light and 700 for heavy.

See Also

Topics:  Working with the Control: Client Area Usage
Raster Images: Drawing on a Bitmap