Logo

Hacker’s Guide to Visual FoxPro
An irreverent look at how Visual FoxPro really works. Tells you the inside scoop on every command, function, property, event and method of Visual FoxPro.

CurrentX, CurrentY

A number of form methods draw right on the form. These two properties track the position of the drawing pen.

Usage

frmForm.CurrentX = nXPosition
nXPosition = frmForm.CurrentX
frmForm.CurrentY = nYPosition
nYPosition = frmForm.CurrentY

Several of the drawing methods use CurrentX and CurrentY as defaults if you omit position parameters. All the drawing methods change the value of CurrentX and CurrentY. Like all drawing routines, units are expressed based on the current ScaleMode setting.

Example

? _SCREEN.CurrentX, _SCREEN.CurrentY
_SCREEN.Box(100, 100, 200, 250)
? _SCREEN.CurrentX, _SCREEN.CurrentY
_SCREEN.CLS
? _SCREEN.CurrentX, _SCREEN.CurrentY
_SCREEN.DrawWidth = 10
_SCREEN.PSet()
? _SCREEN.CurrentX, _SCREEN.CurrentY

See Also

Box, Circle, Cls, Line Method, Print, PSet, ScaleMode