Solved

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

Posted on 2000-04-12
4
190 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Prevent user closing word document opened with VB6 6 73
Recommendation vb6 to vb.net or others 14 142
Send outlook email from VBS Script 2 28
Sub or Function is not defined 6 26
Digital marketing agencies have encountered both the opportunities and difficulties that emerge from working with a wide-ranging organizations.
Marketing can be an uncomfortable undertaking, especially if your material is technology based. Luckily, we’ve compiled some simple and (relatively) painless tips to put an end to your trepidation and start your path to success.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

808 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