如何滚动System.Windows.Forms.WebBrowser的结束?结束、Windows、System、WebBrowser

2023-09-03 15:16:30 作者:你这么顽皮你家里人知道么

如何可以滚动到System.Windows.Forms.WebBrowser编程?

的结束 解决方案

  ctlWebBrowser.Document.Body.ScrollIntoView(假);
 

有ScrollIntoView()的布尔参数为真,以配合在文档的顶部滚动条,并假对准滚动条与所述文档的底部。

MSDN文档在这里:HtmlElement.ScrollIntoView

How can you scroll to the end of a System.Windows.Forms.WebBrowser programmatically?

解决方案 Using System.Windows.Forms.Label and System.Windows.Forms.FontDialog weixin 30535565的博客 CSDN博客

ctlWebBrowser.Document.Body.ScrollIntoView(false);

The boolean parameter for ScrollIntoView() is true to align the scrollbar with the top of the document, and false to align the scrollbar with the bottom of the document.

MSDN documentation here: HtmlElement.ScrollIntoView