Accesing Host Aplication Function via VBScript.

basapa

Newcomer
Joined
Apr 4, 2003
Messages
8
Hello, i've read some threads about how to catch HTML events in a VB.Net application that have a WebBrowser component.

In Microsoft documentation i saw it' possibile to access host functions from HTML scripts "window.external".

But I'm not able to do this. I found examples in C# on Microsoft site.

Do you know if it's possible to do the same using Vb.Net.?

Thanks to all.

Sorry for my english.
 
VB can do everything C# can (except for Unmanaged code) so all you have to do is translate it into VB or create a C# DLL project and put the code there
 
I cannot

I have only Vb.Net, so i cannot create C# project and use the Dll in my Vb.Net Project.

I cannot traduce c# code to VB.Net code because the c# code use an Interface that is not accessible via VB.Net
 
You have to find an assembly where that interface is defined, and unfortunately there isn't a public one in the framework. Interopping with MSHTML like this is not easy, and you end up having to define a lot of interfaces yourself with their GUIDs.

If you just want your application to respond to HTML events, search this forum for "html events".
 
Events

I've just read thread about events but i'd like to use my own function without using events to access my own code.

I want to use window.external capabilities of MSHTML

Thanks
 
Back
Top