Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
How to create Scroll event for web browser control c#?
Posted
Comments
[no name] 31-Jan-13 8:11am    
what task you want to perform at scroll event??

1 solution

Hi,

Since webbrowser class does not expose that kind event, you'd achieve this by inherit and override from OnMouseWheel event to handle as follows:

C#
class CustomWebBrowser : WebBrowser
{

    protected override void OnMouseWheel(MouseEventArgs e)
    {
        base.OnMouseWheel(e);

        //your code here
    }
}


Cheers,
Edo
 
Share this answer
 
Comments
Member 8367060 31-Jan-13 22:59pm    
thanks Edo :)
Member 8367060 31-Jan-13 23:32pm    
But it takes some time to raise the event :(

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900