VB.Net / VB 如何隐藏 WebBrowser 控件 (组件) 中之滚动
由于 WebBrowser 控件组件 并未提供 滚动设定的属性 , 因此必须自行处理啰 !
>
Private Sub WebBrowser1_DocumentCompleted _
(ByVal sender As System.Object, ByVal e As WebBrowserDocumentCompletedEventArgs) Handles _
WebBrowser1.DocumentCompleted
‘ 当 WebBrowser 中的 HTML Document (对象) 载入完成后 , 设定其 "不显示" 滚动
If sender.Document Nothing Then sender.Document.Body.SetAttribute("scroll", "no")
End Sub
================================================================
>
Private Sub AxWebBrowser1_DocumentComplete _
(ByVal sender As Object, ByVal e As AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent) _
Handles AxWebBrowser1.DocumentComplete
sender.Document.Body.SetAttribute("scroll", "no")
End Sub
================================================================
>
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
‘ 当 WebBrowser 中的Document 载入完成后 , 设定其 "隐藏" 滚动
If Not WebBrowser1.Document Is Nothing Then WebBrowser1.Document.body.setAttribute "scroll", "no"
End Sub
原文:大专栏 VB.Net / VB 如何隐藏 WebBrowser 控件 中之滚动
原文地址:https://www.cnblogs.com/petewell/p/11526625.html