This method draws text in the designated object. The text is drawn from a specified point in the designated object (screen, printer, image data).
Parameters
Name | Explanation |
---|---|
DeviceValue | The device context or the raster image data (i.e. Hdc or ImageHandle) depending on the DeviceMode |
x,y | The x and y coordinates of the starting point of the text |
DeviceMode | If 0 (ikScreen), then the output will be drawn in pixel units. If 1 (ikPrinter), the output will be drawn in 0.1mm units. If 2 (ikMemoryHandle), the output will be drawn (in pixel units) to the image data according to the DeviceValue parameter |
In Visual Basic the following constants can also be used: (ikScreen = 0, ikPrinter = 1, ikMemoryHandle = 2).
Return Value
Returns True (nonzero) if successful. Returns False (0) if unsuccessful. Returns False (0) if the cancel button is clicked in the "Print" dialog box.
Explanation
The TextOut method draws text in the designated object from a point specified by the x and y parameters.(screen, printer, image data). It is recommended that you set the following properties prior to executing this method: TextColor1, TextColor2, FontName, FontSize, Transparent, Direction, CharAngle, CharExtra, Text, RotateString.
If 1 or more is set into the CharExtra property then the character spacing is enabled.
When the RotateString property is False, the CharAngle property is enabled for 0, 90, 180, and 270 degrees only. When the RotateString property is True, the Direction property is disabled and the text is drawn from the x and y coordinates in the direction set in the CharAngle property. Note: Because there can be problem with multiline text containing line break code, it is recommended that you process each line of text seperately or use the DrawText method.
If the DeviceMode parameter is 0 or 2 then x, y parameters, and the CharExtra property are in pixel units.
If the DeviceMode parameter is 1 then x, y parameters, and the CharExtra property are in 0.1mm units.