|
-
Aug 16th, 2001, 06:24 AM
#1
Thread Starter
Fanatic Member
Disable webBrowser1 right-click.
How can I disable the right-click of a webbrowser control?
/: Tim :\____________________
\: VB, HTML, ASP, VBScript, QBASIC, JavaScript :/
-
Aug 16th, 2001, 06:44 AM
#2
Thread Starter
Fanatic Member
come on, there must be someway, vb can do everything, can't it?
/: Tim :\____________________
\: VB, HTML, ASP, VBScript, QBASIC, JavaScript :/
-
Aug 16th, 2001, 07:33 AM
#3
Frenzied Member
This is probably the easiest way to do it. 
Be sure to make a reference to the MSHTML.lib (Microsoft HTML Object Library).
VB Code:
Option Explicit
Dim WithEvents hDoc As HTMLDocument
Private Sub Form_Load()
WebBrowser1.Navigate "'http://www.yahoo.com"
End Sub
Private Function hDoc_oncontextmenu() As Boolean
hDoc_oncontextmenu = False
End Function
Private Sub WebBrowser1_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, Cancel As Boolean)
Set hDoc = Nothing
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Set hDoc = WebBrowser1.Document
End Sub
-
Aug 12th, 2016, 08:49 AM
#4
Junior Member
Re: Disable webBrowser1 right-click.
Very useful one thank you ^_^
 Originally Posted by Bloodeye
This is probably the easiest way to do it. 
Be sure to make a reference to the MSHTML.lib (Microsoft HTML Object Library).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|