Parent-child Form scroll bar supports mouse wheel movement

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.