How do you sync scroll two winforms webrowser controls?
Meaning when you scroll one up and down, the other scrolls to the same spot in the underlying document?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I had this answer ahead of time but had no luck finding the answer via google, so I am posting here for posterity.
In the DocumentCompleted event for the browsers, add a handler to the webbrowser control’s Window.Scroll event
I also set the titles here too (made distinguishing them easier when I needed to later)
Write the handler code – here I only needed to sync scroll vertically, but you could do the horizontal sync too.