Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WebBrowser 2

Status
Not open for further replies.

dwhitlow

MIS
Mar 1, 2000
40
US
Is there any way to disable shift+click on the WebBrowser object? It opens up an instance of Internet explorer, and that's not a good thing. I tried the EnableAccelerator method of WBCustomizer, but that just disables key combos (i.e. ctrl+n).
 
In the WebBrowser_NewWindow2 event, set cancel to true. This works for IE5, not sure about IE4, as I don't have access to a system with IE4.<br>
<br>
<p>nick bulka<br><a href=mailto:nick@bulka.com>nick@bulka.com</a><br><a href= > </a><br>
 
You are the man. That worked like a charm. It also helped with my other problem, that users can right click on a Flash presentation. They can still right click, but it doesn't open a new window now. Any ideas on how to turn right click off on a webBrowser object? Thanks again.
 
To do this, you could try subclassing the webbrowser control, but you'd probably run into problems with forms. You can also build a Browser Helper Object. Look up Browser Helper on msdn.<br>
<br>
<p>nick bulka<br><a href=mailto:nick@bulka.com>nick@bulka.com</a><br><a href= > </a><br>
 
Forget what I said about a browser helper. Suggesting a C++ solution to a question in a VB forum was a stupid thing to do. Sorry about that.<br>
<p>nick bulka<br><a href=mailto:nick@bulka.com>nick@bulka.com</a><br><a href= > </a><br>
 
You can do this with client side script, but that's assuming that your users will be forced to stay within your own pages. If that's the case, and you don't know how, let me know. <p>nick bulka<br><a href=mailto:nick@bulka.com>nick@bulka.com</a><br><a href= > </a><br>
 
Well,&nbsp;&nbsp;I haven't been successful is totally trapping the right click with client code.&nbsp;&nbsp;I can do it in Netscape, but with IE the best I could do was substitute a message box for the context menu. <p>nick bulka<br><a href=mailto:nick@bulka.com>nick@bulka.com</a><br><a href= > </a><br>
 
Yup, I was able to do the same thing. That would be acceptable, but right clicking on a flash presentation still brings up About Flash... It must be part of the Flash plugin. This is starting to piss me off. Is there a way I can just make Windows ignore the right mouse button completely? It would be perfect if I could &quot;turn off&quot; the right mouse button when I start my code, and &quot;turn it back on&quot; when it exits.<br>The way my luck has been going, this is probably not possible. By the way, thanks for all you help Nick.
 
As I mentioned in an earlier post,&nbsp;&nbsp;you can try subclassing. If you don't know what subclassing is, it enables you to intercept messages sent to other windows. But it takes a lot of knowledge about the Windows API, and if you do it wrong,&nbsp;&nbsp;you could crash Windows or make it unusable.<br><br>There are custom controls available to make subclassing easy for you, if you're willing to spend some money.&nbsp;&nbsp;Desaware (<A HREF=" TARGET="_new"> makes the most popular one in their Spyworks product,&nbsp;&nbsp;but there are some shareware subclassing controls as well.&nbsp;&nbsp;Go to <A HREF=" TARGET="_new"> and type 'subclass' in the search box. <br> <p>nick bulka<br><a href=mailto:nick@bulka.com>nick@bulka.com</a><br><a href= > </a><br>
 
Thanks for the info. I finally got a hold of Macromedia, and they said there was no way to disable that About thing. I finally found the perfect solution to my problem. I got the web guys to get rid of that #$%*!@ Flash. It was a waste of time anyways. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top