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(dc As Long, left As Long, top As Long, _ right As Long, bottom As Long) _ Handles viewer.redraw Dim firstPage As Long, lastPage As Long viewer.getWindowPageRange(left, top, right, bottom, firstPage, lastPage) ' update firstPage .. lastPage End Sub