By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,767 Members | 1,041 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,767 IT Pros & Developers. It's quick & easy.

AxWebBrowser disable javascript / all scripting

P: n/a
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.
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies

P: n/a
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
Nov 21 '05 #2

P: n/a

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]
<Windy> wrote in message news:%2****************@TK2MSFTNGP15.phx.gbl...
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.

Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.