AxWebBrowser disable javascript / all scripting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,
I would like to know if there are anyways to disable javascript, activeX
and all scripting on AxWebBrowser.
I have a program that include the AxWebBrowser and load internet pages, but
some pages keep having javascript error and a popup was shown.
I want to eliminate all the popup from javascript and other object, how can
I achieve this?

Thanks a lot.
Windy.
 
Windy,

The axwebbrowser reuse Internet Explorer (shdocvw) as it is installed on the
client computer.

Therefore it is not possible to set other settings in that, than as is in
that IE.

Practical it is of course possible to reset registry settings. I advice you
never to do this kind of things.

By changing registry settings that are not part of your program, you can be
held direct responsible for any damage that can happen because the fact that
you have changed registry settings without the knowledge of the user.

This even when your program set it back in original state. If the user use
than the program while your program is active, or your program crashes, than
the problem will be the same.

However just my thought,

Cor
 
Hello Windy

You can bypass the behavior of the webbrowser control without influencing
the normall behavior of internet explorer

in VB6 this was done with the wbcustomizer.dll that was made availlable by
ms and written in C++ however as i never liked externall dependancies in my
projects i achieved the same thing with subclassing the webbrowser control
,,,,, as VB.Net was ariving i had to find a simular way to , dissable /
bypass the normall explorer behavior i asked a lot and heard from a lot of
people that it was not possible
so i invented the wheel but made it publicly availlable

my example is made to prevent ctr + p ( print the screen ) , right mouse
click ( to see the source of the html page ) , Backspace ( for history -1
behvior ) etc etc etc
it can easily extended to annything you need ,, ( just capture the
messages and add them to the select case )

you can download the code here

http://www.freevbcode.com/ShowCode.Asp?ID=5635

Regards

Michel Posseth [MCP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top