This property returns and sets a value that determines the appearance of output from a graphics method or the appearance of a Shape or Line control.
object.DrawMode [= number]
Constant |
Setting |
Description |
vbBlackness | 1 | Black. |
vbNotMergePen | 2 | Inverse of setting 15 (vbMerge Pen). |
vbMaskNotPen | 3 | Combination of the colors common to the background color and the inverse of the pen. |
vbNotCopyPen | 4 | Inverse of setting 13 (vbCopy Pen). |
vbMaskPenNot | 5 | Combination of the colors common to both the pen and the inverse of the display. |
vbInvert | 6 | Inverse of the display color. |
vbXorPen | 7 | Combination of the colors in the pen and in the display color, but not in both. |
vbNotMaskPen | 8 | Inverse of setting 9 (vbMask Pen). |
vbMaskPen | 9 | Combination of the colors common to both the pen and the display. |
vbNotXorPen | 10 | Inverse of setting 7 (vbXorPen). |
vbNop | 11 | No operation—output remains unchanged. This setting turns drawing off. |
vbMergeNotPen | 12 | Combination of the display color and the inverse of the pen color. |
vbCopyPen | 13 (default) | Color specified by the ForeColor property. |
vbMergePenNot | 14 | Combination of the pen color and the inverse of the display color. |
vbMergePen | 15 | Combination of the pen color and the display color. |
vbWhiteness | 16 | White. |
Use this property to produce visual effects with Shape or Line controls or to draw with the graphics methods. Visual Basic for Windows CE compares each pixel in the draw pattern to the corresponding pixel in the existing background and then applies bit-wise operations. For example, setting 7 (Xor Pen) uses the Xor operator to combine a draw pattern pixel with a background pixel.
The exact effect of a DrawMode setting depends on the way the color of a line drawn at run time combines with colors already on the screen. Settings 1, 6, 7, 11, 13, and 16 yield the most predictable results.