问题描述
大家好,
我有以下问题:
==>我想在WPF中滚动Web浏览器控件.我找到了一个使用P/Invoke(http://weblogs.asp.net/israelio/archive/2004/07/20/188664.aspx)进行此操作的教程,例如,它在RichTextBox控件上效果很好:
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);
但是,当我想在WebBrowser控件上执行相同的操作并使用与上述相同的功能时,它什么也不做.在调用该函数之前,我还把焦点放在了webBrowser控件上,但是仍然没有任何反应.
有人可以建议我如何以编程方式滚动webBrowser控件,或者至少如何将客户区域(控件的可见部分)移动到特定位置吗?
预先感谢,
Tamash
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
推荐答案
这篇关于控件上的程序化滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!