Get the range of pages intersected by a window coordinate rectangle.
getWindowPageRange([in] int left, [in] int top, [in] int right, [in] int bottom, [out] int *firstPage, [out] int *lastPage)
This function takes a rectangle, in window coordinates, and returns the first and last page numbers that are inside that rectangle.

This can be useful, for example, in redraw event handlers, to figure out which pages need to be redrawn.

Private Sub viewer_redraw(ByVal dc As Long, ByVal left As Long, ByVal top As Long, _ ByVal right As Long, ByVal bottom As Long) Dim firstPage As Long, lastPage As Long viewer.getWindowPageRange(left, top, right, bottom, firstPage, lastPage) ' update firstPage .. lastPage End Sub