TDirectDraw
property ScanLine: Longint;
Read only. Returns the scan line that is currently being drawn on the monitor or -1 if a vertical blank is in progress.
See also IDirectDraw2::GetScanLine.