DrawPenWidth property (Main Control)

Visual Basic example
Visual C++ 4.0 example

Visual J++ example

Syntax short DrawPenWidth

Overview:  Refer to Drawing Simple Objects.

Remarks

(Persistent property, available at design time) Specifies the width, in pixels, of the lines of a drawing object.

If the target is the screen, the measurement is in screen pixels; if the target is the bitmap, it is in bitmap pixels. Therefore, if you draw to the bitmap, and the displayed image is scaled down (the destination rectangle is smaller than the source rectangle), thin lines may not appear on the displayed image. This happens because scaling down an image causes some pixels to be thrown out. In a bitonal (black and white) image, you can overcome this problem with favor-black setting of the BitonalScaling property, which is Document/Medical only.

See Also

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