Dear Santa, My Webbrowser Wish List......

J

Jim

Dear Santa,

While it's true that I haven't been perfect this year, it's definitely
an improvement over previous years. All cats still have their own fur, no
hidden cat fur in this year's Thanksgiving green bean casserole and not even
one kid in the neighborhood has lost a toe this year!

With these things in mind, I'd like to ask for knowledge this Christmas.
Specifically, for knowledge about extending the webbrowser control in VB.Net
2.0

While the .Net interface is really neat and easy to use, it lacks access
to some of the activeX component's more powerful features. Like no access
to the IInternetSecurity interface (to allow or block stuff like activeX,
java, sounds, etc.) to set security for each instance of the control on a
per page or per site basis, no easy way to control or override the context
menus, no exposed download control (being able to invoke an internal
download manager instead of having to code a COM component and register it
separately from the core application),how to save pages as MHT files, how to
keep my webbrowser control settings separate from the user's IE settings in
the registry and how to add ExecWB commands to my webbrowser control.
Well.....these are a start anyway.

I don't know how much help it is, but I saw something concerning most of
this stuff at
http://msdn.microsoft.com/library/d...eference/ifaces/iwebbrowser2/iwebbrowser2.asp.

It would be nice to have a class with these objects pre-wrapped. But it
would be nicer to learn how to implement these things myself so that I can
extend classes and expose interfaces on many other objects as I learn and
work.

Whatever you decide to leave under this tree, please know that my little
sister really wanted her hair cut that way.....HONEST!

Jim
 
N

Nicholas Paldino [.NET/C# MVP]

Jim,

How about the ActiveXInstance property? It will return an object which
is the Runtime Callable Wrapper for the actual ActiveX control. You can
then use this in any way that you would use the regular web browser control
in non-managed applications (although you might have to define some of the
interfaces yourself).

Hope this helps.
 
J

Jim

As far as the ActiveXInstance object is concerned, it is ReadOnly - you
can't set any properties here. Look at
http://msdn2.microsoft.com/en-us/library/system.windows.forms.webbrowserbase.activexinstance.aspx.

Defining interfaces is one of the areas I need help with. How do you
"define an interface" in VB.Net? Where do you get the interface properties
for the definition? Examples would be most excellent.

Thanks for your input!

Nicholas Paldino said:
Jim,

How about the ActiveXInstance property? It will return an object which
is the Runtime Callable Wrapper for the actual ActiveX control. You can
then use this in any way that you would use the regular web browser
control in non-managed applications (although you might have to define
some of the interfaces yourself).

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Jim said:
Dear Santa,

While it's true that I haven't been perfect this year, it's definitely
an improvement over previous years. All cats still have their own fur,
no hidden cat fur in this year's Thanksgiving green bean casserole and
not even one kid in the neighborhood has lost a toe this year!

With these things in mind, I'd like to ask for knowledge this
Christmas. Specifically, for knowledge about extending the webbrowser
control in VB.Net 2.0

While the .Net interface is really neat and easy to use, it lacks
access to some of the activeX component's more powerful features. Like
no access to the IInternetSecurity interface (to allow or block stuff
like activeX, java, sounds, etc.) to set security for each instance of
the control on a per page or per site basis, no easy way to control or
override the context menus, no exposed download control (being able to
invoke an internal download manager instead of having to code a COM
component and register it separately from the core application),how to
save pages as MHT files, how to keep my webbrowser control settings
separate from the user's IE settings in the registry and how to add
ExecWB commands to my webbrowser control. Well.....these are a start
anyway.

I don't know how much help it is, but I saw something concerning most
of this stuff at
http://msdn.microsoft.com/library/d...eference/ifaces/iwebbrowser2/iwebbrowser2.asp.

It would be nice to have a class with these objects pre-wrapped. But
it would be nicer to learn how to implement these things myself so that I
can extend classes and expose interfaces on many other objects as I learn
and work.

Whatever you decide to leave under this tree, please know that my
little sister really wanted her hair cut that way.....HONEST!

Jim
 
C

Cor Ligthert [MVP]

Jim,

Thanks, I did not know that I could get that information by searching for
webbrowser2.

There is told that the MSDN team is very much busy to work on there website
to get it better again. It is known that it is not working at the moment as
it should be.

Not much but than you know you share your problem with others.

Cor
 
C

Charles Law

Hi Jim

The fact that the ActiveXInstance property is read-only is not a problem. It
exposes the underlying web browser object, which understandably you cannot
change because it represents the instance.

What one can do is get at the interfaces that it implements, in just the
same way as could be done in VB 2003.

Pretty much all the interfaces can be found in the PlatformSDK\include
directory where VS is installed. Granted, they are in C, but if there are
any particular ones that you have difficulty converting then I'm sure a post
here or in the languages.vb newsgroup will get a response. You could also
try in microsoft.public.dotnet.framework.interop.

[For IInternetSecurity, I assume you mean IInternetSecurityManager, as I
cannot see the former anywhere]

I do agree with your original request though. The information is pretty
thin, and it takes quite a bit of ferreting and rummaging to pull it
altogether. I hope your plea falls on kindly ears.

HTH

Charles
P.S. microsoft.public.inetexplorer.ie6.browser does not exist. Did you mean
microsoft.public.windows.inetexplorer.ie6.browser?


Jim said:
As far as the ActiveXInstance object is concerned, it is ReadOnly - you
can't set any properties here. Look at
http://msdn2.microsoft.com/en-us/library/system.windows.forms.webbrowserbase.activexinstance.aspx.

Defining interfaces is one of the areas I need help with. How do you
"define an interface" in VB.Net? Where do you get the interface
properties for the definition? Examples would be most excellent.

Thanks for your input!

Nicholas Paldino said:
Jim,

How about the ActiveXInstance property? It will return an object
which is the Runtime Callable Wrapper for the actual ActiveX control.
You can then use this in any way that you would use the regular web
browser control in non-managed applications (although you might have to
define some of the interfaces yourself).

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Jim said:
Dear Santa,

While it's true that I haven't been perfect this year, it's
definitely an improvement over previous years. All cats still have
their own fur, no hidden cat fur in this year's Thanksgiving green bean
casserole and not even one kid in the neighborhood has lost a toe this
year!

With these things in mind, I'd like to ask for knowledge this
Christmas. Specifically, for knowledge about extending the webbrowser
control in VB.Net 2.0

While the .Net interface is really neat and easy to use, it lacks
access to some of the activeX component's more powerful features. Like
no access to the IInternetSecurity interface (to allow or block stuff
like activeX, java, sounds, etc.) to set security for each instance of
the control on a per page or per site basis, no easy way to control or
override the context menus, no exposed download control (being able to
invoke an internal download manager instead of having to code a COM
component and register it separately from the core application),how to
save pages as MHT files, how to keep my webbrowser control settings
separate from the user's IE settings in the registry and how to add
ExecWB commands to my webbrowser control. Well.....these are a start
anyway.

I don't know how much help it is, but I saw something concerning most
of this stuff at
http://msdn.microsoft.com/library/d...eference/ifaces/iwebbrowser2/iwebbrowser2.asp.

It would be nice to have a class with these objects pre-wrapped. But
it would be nicer to learn how to implement these things myself so that
I can extend classes and expose interfaces on many other objects as I
learn and work.

Whatever you decide to leave under this tree, please know that my
little sister really wanted her hair cut that way.....HONEST!

Jim
 

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

Top