Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


Interacting with ActiveX in WebBrowser control?



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> HTML Forum
View previous topic :: View next topic  
Author Message
impen



Joined: 25 Apr 2008
Posts: 3

PostPosted: Fri Apr 25, 2008 10:41 am    Post subject: Interacting with ActiveX in WebBrowser control? Reply with quote

Hi.

I'm developing an application in VB6. In that application, we're using the WebBrowser control based on Internet Explorer. That WebBrowser control loads a local web page containing an ActiveX object.

Now, when i send parameters to the object using the <param> tag, or when i call the ActiveX object using javascript (as described below) i get a security question from Internet Explorer asking me if i want to allow interaction between the ActiveX control and the rest of the web page even though it might be a security risk.

I want to get rid of that security question. How can that be done?

Code:
<object id="myActiveXControl" classid="[...]" codebase="[...]">
  <param name="[...]" value="[...]">
  myControl
</object>
<script>
  document.getElementById('myActiveXControl').someFunction("Value");
</script>


Our application will be installed on our customers computers, hence we have access to the registry and such. Can it maybe be solved by installing certificates and signing the control?

Thanks!
Back to top
View user's profile Send private message
rangana
500+ Club


Joined: 27 Feb 2008
Posts: 563
Location: Cebu City Philippines

PostPosted: Fri Apr 25, 2008 11:22 am    Post subject: Re: Interacting with ActiveX in WebBrowser control? Reply with quote

You should'nt be worying that much Smile

...This only happens locally and not when your file is uploaded on the server already Wink

...But still if you hate to see the yellow-bar annoyances, add this script just right above you html tag:
Code:

<!-- saved from url=(0014)about:internet -->


This link might help relieve your grief too Wink

http://msdn2.microsoft.com/en-us/library/ms537628.aspx
Back to top
View user's profile Send private message Yahoo Messenger
impen



Joined: 25 Apr 2008
Posts: 3

PostPosted: Fri Apr 25, 2008 12:53 pm    Post subject: Re: Interacting with ActiveX in WebBrowser control? Reply with quote

Thanks for your reply.

The thing is, though, that the file will never be uploaded on any server but it'll always be run locally in our application using a WebBrowser control. Sadly your solution didn't work for me locally either.
Back to top
View user's profile Send private message
impen



Joined: 25 Apr 2008
Posts: 3

PostPosted: Fri Apr 25, 2008 1:33 pm    Post subject: Re: Interacting with ActiveX in WebBrowser control? Reply with quote

I finally found my solution. I'll post it here in case someone else might need it.

The solution is that the ActiveX control must implement IObjectSafety. How that is done is described here: http://support.microsoft.com/kb/182598. Note that after step 4 you must register your new .tlb file. That's done like this:
Code:
regtlib <Full path of .tlb file>
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> HTML Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap