hubdog上提到过,给的例子如下:<br>procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word; <br>Shift: TShiftState); <br>begin <br>if Key = VK_F8 then <br>SendMessage(Memo1.Handle, { HWND of the Memo Control } <br>WM_VSCROLL, { Windows Message } <br>SB_PAGEDOWN, { Scroll Command } <br>0) { Not Used } <br>else if Key = VK_F7 then <br>SendMessage(Memo1.Handle, { HWND of the Memo Control } <br>WM_VSCROLL, { Windows Message } <br>SB_PAGEUP, { Scroll Command } <br>0); { Not Used } <br>end; <br><br>这个例子中用的是pageDown或pageUp参数,<br>这个函数的原型是:<br>The WM_VSCROLL message is sent to a window when a scroll event occurs in the window's standard vertical scroll bar. This message is also sent to the owner of a vertical scroll bar control when a scroll event occurs in the control. <br><br>WM_VSCROLL <br>nScrollCode = (int) LOWORD(wParam); // scroll bar value <br>nPos = (short int) HIWORD(wParam); // scroll box position <br>hwndScrollBar = (HWND) lParam; // handle of scroll bar <br> <br><br>Parameters<br><br>nScrollCode<br><br>Value of the low-order word of wParam. Specifies a scroll bar value that indicates the user's scrolling request. This parameter can be one of the following values: <br><br>Value Meaning<br>SB_BOTTOM Scrolls to the lower right.<br>SB_ENDSCROLL Ends scroll.<br>SB_LINEDOWN Scrolls one line down.<br>SB_LINEUP Scrolls one line up.<br>SB_PAGEDOWN Scrolls one page down.<br>SB_PAGEUP Scrolls one page up.<br>SB_THUMBPOSITION Scrolls to the absolute position. The current position is specified by the nPos parameter.<br>SB_THUMBTRACK Drags scroll box to the specified position. The current position is specified by the nPos parameter.<br>SB_TOP Scrolls to the upper left.<br> <br><br>nPos<br><br>Value of the high-order word of wParam. Specifies the current position of the scroll box if the <br>nScrollCode parameter is SB_THUMBPOSITION or SB_THUMBTRACK; otherwise, nPos is not used. <br><br>hwndScrollBar<br><br>Value of lParam. Identifies the control if WM_VSCROLL is sent by a scroll bar control. If WM_VSCROLL is sent by a window's standard scroll bar, hwndScrollBar is not used. <br><br> <br><br>Return Values<br><br>If an application processes this message, it should return zero. <br><br>Remarks<br><br>The SB_THUMBTRACK notification message is typically used by applications that provide feedback as the user drags the scroll box. <br>If an application scrolls the content of the window, it must also reset the position of the scroll box by using the SetScrollPos function. <br>Note that the WM_VSCROLL message carries only 16 bits of scroll box position data. Thus, applications that rely solely on WM_VSCROLL (and WM_HSCROLL) for scroll position data have a practical maximum position value of 65,535. <br><br>However, because the SetScrollPos, SetScrollRange, GetScrollPos, and GetScrollRange functions support 32-bit scroll bar position data, there is a way to circumvent the 16-bit barrier of the WM_HSCROLL and WM_VSCROLL messages. See GetScrollPos for a description of the technique and its limits. <br><br>See Also<br><br>GetScrollPos, GetScrollRange, SetScrollPos, SetScrollRange, WM_HSCROLL <br>=========================================================================<br>好像还有其他函数可以滚屏,我记得当时试过,但记不太清了<br>星际浪人如果有答案请告诉我,谢谢。<br>