DrawPoint

Sets a point on an object to a specified color.

Syntax

object.DrawPoint x, y, [color]

The parts and object qualifier of the DrawPoint method syntax are described in the following table.

Part Description
object Optional. Object expression that evaluates to an object. If object is omitted, the Form with the focus is assumed to be object.
x, y Required. Single values indicating the horizontal (x-axis) and vertical (y-axis) coordinates of the point to set.
color Optional. Long integer value indicating the RGB color specified for point. If omitted, the current ForeColor property setting is used. You can use the RGB function to specify the color.

Remarks

The size of the point drawn depends on the setting of the DrawWidth property. When DrawWidth is 1, DrawPoint sets a single pixel to the specified color. When DrawWidth is greater than 1, the point is centered on the specified coordinates.

To clear a single pixel with the DrawPoint method, specify the coordinates of the pixel and use the BackColor property setting as the color argument.