var<br> i,j:integer;<br>begin<br> {if GetScrollRange(RichEdit1.Handle,SB_VERT,i,j) then<br> showmessage(inttostr(i)+','+inttostr(j));<br> ShowMessage(inttostr(GetScrollPos(RichEdit1.Handle,SB_VERT)));<br> RichEdit1.Perform(SBM_GETRANGE,i,j);<br> showmessage(inttostr(i)+','+inttostr(j));}<br> i:=RichEdit1.Perform(EM_GETFIRSTVISIBLELINE,0,0);<br> if RichEdit1.Perform(WM_VSCROLL,SB_PAGEDOWN,j)=0 then<br> begin<br> j:=RichEdit1.Perform(EM_GETFIRSTVISIBLELINE,0,0);<br> RichEdit1.Perform(WM_VSCROLL,SB_PAGEUP,j);<br> end;<br> showmessage('当前显示行数是: '+inttostr(j-i));<br>end;<br>