Click here to Skip to main content
15,891,567 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
Hello everyone,

I have the following problem:
==> I want to scroll a web browser control in WPF. I'ved found a tutorial to do this using P/Invoke (http://weblogs.asp.net/israelio/archive/2004/07/20/188664.aspx) and it works great on a RichTextBox control for example:
SendMessage( richTextBox1.Handle, WM_VSCROLL, (IntPtr)SB_PAGEDOWN, IntPtr.Zero);

However when I want to do the same thing on a WebBrowser control and use the same function as above, it does nothing. I'ved also set the focus on the webBrowser control before calling the function, but still nothing happens.

Could someone advise me how to programmatically scroll a webBrowser control, or at least how to move the client area (the visible part of the control) to a specific position?


Thanks in advance,
Tamash
Posted

1 solution

 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 13-Feb-11 12:43pm    
Quite simple and correct, my 5.
--SA
Manfred Rudolf Bihy 13-Feb-11 12:50pm    
Here's your 5+!

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