Solved

how to disable the pop up menu in WebBrowser control??

Posted on 2000-04-12
4
186 Views
Last Modified: 2013-11-28
I am using the WebBrowser control in my program written in VB6.  Is there any way to disable the pop up menu in the WebBrowser control?(i.e do not display the pop up menu when I right click inside the control).
0
Comment
Question by:aimui
  • 2
4 Comments
 
LVL 28

Expert Comment

by:AzraSound
ID: 2710453
0
 

Accepted Solution

by:
negeon earned 50 total points
ID: 2710528
You can reference Microsoft HTML Object Library(MSHTML.tlb).We suppose your WebbrowseControl named "WB1".
Option Explicit
Private WithEvents oDocument As HTMLDocument
Private Sub WB1_DownloadComplete()
Set oDocument = WB1.Document
End Sub
Private Function oDocument_oncontextmenu() As Boolean
'Notice you can do what you want to do,you can simply place a "'" or "REM" or you own popup menu,do what you like,enjoy it.
End Function

0
 

Author Comment

by:aimui
ID: 2711133
Thanks.
Can I just left the function oDocument_oncontextmenu() empty If I don't want to display the menu?
Why the menu still been displayed in a dynamic html page contains three frames?
0
 

Author Comment

by:aimui
ID: 2711152
Thanks.
Can I just left the function oDocument_oncontextmenu() empty If I don't want to display the menu?
Why the menu still been displayed in a dynamic html page contains three frames?
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

With a software solution, you always get to control email signatures and have the final say on the design - not an unrelated department or the uninterested end user.
Read about how to choose the best possible content marketing agency to suit your needs. Content marketing has become an integral part of running a successful tech business, so it is wise to be informed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now