在vb中,怎样做才能将webbrowser 控件的滚动条去掉?
2013-07-11
展开全部
下面的代码很全面。可以参考一下。 Dim WithEvents M_Dom As HTMLDocument '禁止用户在“WebBrowser”控件中使用鼠标右键
Private Function M_Dom_oncontextmenu() As Boolean '#禁止用户在“WebBrowser”控件中使用鼠标右键
M_Dom_oncontextmenu = False '#
End Function '#
Private Sub Webbrowser1_DownloadComplete() '#
Set M_Dom = WebBrowser1.Document '#
End Sub '#
Private Sub Webbrowser1_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
On Error GoTo webERROR
Set M_DomHELP = webHELP.Document
webHELP.Document.body.Scroll = "no" '#打开网页完成时,不显示滚动条
webHELP.Visible = HELPFlag
If HELPFlag Then
Picture8.Visible = Not HELPFlag
End If
'Exit Sub
Exit Sub
webERROR:
End Sub
Private Function M_Dom_oncontextmenu() As Boolean '#禁止用户在“WebBrowser”控件中使用鼠标右键
M_Dom_oncontextmenu = False '#
End Function '#
Private Sub Webbrowser1_DownloadComplete() '#
Set M_Dom = WebBrowser1.Document '#
End Sub '#
Private Sub Webbrowser1_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
On Error GoTo webERROR
Set M_DomHELP = webHELP.Document
webHELP.Document.body.Scroll = "no" '#打开网页完成时,不显示滚动条
webHELP.Visible = HELPFlag
If HELPFlag Then
Picture8.Visible = Not HELPFlag
End If
'Exit Sub
Exit Sub
webERROR:
End Sub
2013-07-11
展开全部
用图片框,把滚动条盖住就行了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询