How to use a .net class library

darbid

Registered User.
Local time
Today, 19:46
Joined
Jun 26, 2008
Messages
1,428
My first question was whether this was possible. I am now pretty sure it is.

I thought I would post here as it is Access VBA that I want to use this

I want or need to use the WebBrowser.ObjectForScripting property so that I can access a form from Jscript on a HTML page - this is possible with the above property http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.objectforscripting(VS.85).aspx
Which is part of the .NET System.Windows.Forms Namespace http://msdn.microsoft.com/en-us/library/system.windows.forms(VS.85).aspx

I see in another thread here Banana has some experience on this creating Interops.

more specifically i want to do this which is possible in .net

on my form which has a webbrowser named Webbrowser1

Code:
WebBrowser1.ObjectForScripting = Me
this form has a webbrowser control on it and this html page has the following in it

Code:
window.external.getID(my_ID)
getID being a routine of my VBA form.


Thanks in advance guys.

ps. If you are thinking this guy is an idiot that is a lot of work and there must be another solution - you are probably right but I am also doing this to extend my experience and jump in the deep end.
 
I'm not really following here.

Are we talking about Forms created inside Visual Studio with a WebBrowser control, or a Access form with ActiveX WebBrowser control?
 
Hi Banana I hoped that you would look at this.

I want to use the WebBrowser Control that .NET uses on a MSAccess form because it exposes the objectforscripting property. I am using Access 2003.

But to make a wrapper or play with this I do have access to VS.2008.

I am reading and researching this now and see that the WebBrowser control from .NET is a wrapper for the COM control anyway so maybe there is another way of doing this.

I will post in General a summary and mdb of where I am at in about 2 min as I know that i have started many threads here with various questions.
 
Well, if it's going to be a control, it'll have to conform to ActiveX specifications (which build on top of COM specifications, IINM) in order for Access to interact with it.

Though I would think it far more simpler to display the webbrowser as a pop-up .NET form managed by the library and send/receive data you need for Access to store instead. This not only avoid the inherent flaws in ActiveX but allow you to use the control natively.
 
I would think it far more simpler to display the webbrowser as a pop-up .NET form managed by the library and send/receive data you need for Access to store instead.
Putting this back into "dumb speak" make a little exe with one form (.NET Form) and the webbrowser on it in VS.2008 and then parent this form with my access form and I can then handle the comunications between my access form and the .Net form.

ie

Access Form <-->.NET Form <-->Web Browser

In the general forum I have placed an example of all my google earth trys so far.
 
Well, it wouldn't be an .exe, but rather a .dll, and I'm not sure what you mean by "parent"... if you mean subform, then no that is not possible. You can only call the library and tell it to display a pop up form which will operate independently of Access but depending on how you write the form class, it can be made to send data back to Access or such.

As for Google Earth, I believe you don't even need .NET for that- ChrisO placed a sample demonstrating how to use it, I think.
 

Users who are viewing this thread

Back
Top Bottom