DirectX SDK |
The DirectDraw7.GetScanLine method retrieves the scan line that is currently being drawn on the monitor.
object.GetScanLine(lines As Long) As Long
If the method succeeds, it returns DD_OK, indicating that the calling application can continue.
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 |
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.
DirectDraw7.GetVerticalBlankStatus, DirectDraw7.WaitForVerticalBlank