Occurs in a Grid control or Form object when moving horizontal or vertical scroll bars or moving a scroll box. The Scrolled event also occurs for a grid if you call the DoScroll method from within a program. The Scrolled event does not occur when pressing keyboard arrow keys.
PROCEDURE Object.Scrolled LPARAMETERS nDirection
Specifies how the user scrolled through the contents of a Grid control or a form. The following table describes the possible values for nDirection.
Value User scrolled using...
Up arrow on vertical scroll bar.
Down arrow on vertical scroll bar.
Vertical scroll bar in area above the scroll box.
Vertical scroll bar in area below the scroll box
Left arrow on horizontal scroll bar.
Right arrow on horizontal scroll bar.
Horizontal scroll bar in area to the left of the scroll box.
Horizontal scroll bar in area to the right of the scroll box.
The Scrollbars property determines whether a form has scroll bars.
Screen painting problems can occur when the grid or form is scrolled. Therefore, avoid creating wait states, for example, using the WAIT WINDOW command, within the Scrolled event.