Microsoft DirectX 8.1 (Visual Basic)

D3DX8.DrawText

Draws formatted text on a Microsoft® Direct3D® device.

object.DrawText( _ 
    D3dFont As D3DXFont, _ 
    Color As Long, _ 
    TextString As String, _ 
    RECT As RECT, _ 
    Format As Long)

Parts

object
Object expression that resolves to a D3DX8 object.
D3dFont
A D3DXFont object specifying the font to use.
Color
Long value specifying the color of the text.
TextString
The string to draw.
RECT
RECT type that contains the rectangle, in logical coordinates, in which the text is to be formatted.
Format
A combination of values from the CONST_DTFLAGS enumeration, specifying the text formatting.

Error Codes

If the method fails, an error is raised and Err.Number can be set to one of the following values.

D3DERR_INVALIDCALL
D3DERR_NOTAVAILABLE
D3DERR_OUTOFVIDEOMEMORY
E_OUTOFMEMORY

For information on trapping errors, see the Microsoft Visual Basic® Error Handling topic.

See Also

CONST_DTFLAGS, D3DXFont.DrawText