1 //415799952 Quest2 //513187410 Crazy →delphi3 //1746539685 Dnyy4 5 6 //1. Set which direction to move7 procedureTform1.bitbtn2click (sender:tobject);8 begin9 ifBitbtn2. caption='Scroll Vertically' ThenTen begin OneBitbtn2. caption:='Horizontal scrolling'; ABitbtn2. tag:=0; - End - Else the begin -Bitbtn2. caption:='Scroll Vertically'; -Bitbtn2. tag:=1; - End; + End; - + //2. Move a A procedureTform1.formmousewheeldown (sender:tobject; Shift:tshiftstate; atMousepos:tpoint;varHandled:boolean); - begin - ifBitbtn2. tag=1 Then -PostMessage (Form1.clienthandle,wm_vscroll,sb_linedown,0) - Else -PostMessage (Form1.clienthandle,wm_hscroll,sb_lineright,0); in End; - to //3. Move two + procedureTform1.formmousewheelup (sender:tobject; Shift:tshiftstate; -Mousepos:tpoint;varHandled:boolean); the begin * ifBitbtn2. tag=1 Then $PostMessage (Form1.clienthandle,wm_vscroll,sb_lineup,0)Panax Notoginseng Else -PostMessage (Form1.clienthandle,wm_hscroll,sb_lineleft,0); the End;
Parent-child Form scroll bar supports mouse wheel movement