PSet Method (AForm)

Sets a point on an object to a specified color.

Syntax

Object.PSet ( [bStep] [, fX] [, fY] [, lclr] )

The PSet method syntax has the following parts:

 

Name

Type

Description

Object

AForm

AForm object

bStep

Val Variant

Expects a boolean that specifies whether the coordinates are relative to the current graphics position given by the CurrentX and CurrentY properties.

fX

Val Float

The horizontal coordinate (x-axis) for the point to set.

fY

Val Float

The vertical coordinate (y-axis) for the point to set.

lclr

Val Variant

Long integer value indicating the RGB color specified for the point. If omitted, the current ForeColor property setting is used. The RGB function or QBColor function can be used to specify the color.

Where

bStep can be one of the following:

 

Value

Description

True

The coordinates are relative to the current graphics position given by the CurrentX and CurrentY properties.

False *

The coordinates are absolute.

Comments

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

The way the point is drawn depends on the setting of the DrawMode and DrawStyle properties.

When PSet executes, the CurrentX and CurrentY properties are set to the point specified by the arguments.

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

The PSet method cannot be used in an With&ldots;End With block.

Example

The following statement sets a point at x=60 and y=70 to a red color on the AForm:

frm1.PSet(1,60,70,aclrRed)

Applies to

AForm

See Also

BackColor, CurrentX, CurrentY, DrawMode, DrawStyle, DrawWidth, ForeColor