请问如何编程控制滚动条的滚动(50分)

P

plf22

Unregistered / Unconfirmed
GUEST, unregistred user!
在listBox,treeview等控件中,如何去控制滚动条滚动?
 
这是memo的,大致意思,自己改改就OK了
procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Key = VK_F8 then
SendMessage(Memo1.Handle, { HWND of the Memo Control }
WM_VSCROLL, { Windows Message }
SB_PAGEDOWN, { Scroll Command }
0) { Not Used }
else if Key = VK_F7 then
SendMessage(Memo1.Handle, { HWND of the Memo Control }
WM_VSCROLL, { Windows Message }
SB_PAGEUP, { Scroll Command }
0); { Not Used }
end;
 
能不能控制一行一行的移动?
 
当然有,老弟,自己找找不就结了,赫赫
SB_LINEDOWN 和 SB_LINEUP
 
已经搞定,谢了!
 
顶部