DirectX SDK

DirectDraw7.GetScanLine

The DirectDraw7.GetScanLine method retrieves the scan line that is currently being drawn on the monitor.

object.GetScanLine(lines As Long) As Long

Parameters

object
Object expression that resolves to a DirectDraw7 object.
lines
Current scan line.

Return Values

If the method succeeds, it returns DD_OK, indicating that the calling application can continue.

Error Codes

If the method fails, it raises an error, and Err.Number can be set to one of the following values:

DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS
DDERR_UNSUPPORTED
DDERR_VERTICALBLANKINPROGRESS

Remarks

Scan lines are reported as zero-based integers. The returned scan line value is in the range from 0 through n, where 0 is the first visible scan line on the screen and n is the last visible scan line, plus any scan lines that occur during the vertical blank period. Therefore, in a case in which an application is running at 640×480, and there are 12 scan lines during vblank, the values returned by this method range from 0 through 491.

See Also

DirectDraw7.GetVerticalBlankStatus, DirectDraw7.WaitForVerticalBlank