Jump to content
xisto Community
PureHeart

Activex In Html anyone know how to use ActiveX control in WebApp?

Recommended Posts

I'm writing a web application for language learning and I'd like to use the Speech API from Microsoft for speech recognition. Therefore, I need to embed an ActiveX control to the web page (html file). The questions are:

 

1. How to embed this ActiveX control to the web page, I don't know the class id of that control. For a RealPlayer, I would use

<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="32" height="32"></object>
and in this case, i need the value for classid.

 

2. In case the user (client) doesn't have that activeX control, how to have it downloaded automatically (with permission)?

 

3. How to handle the events of the control.

 

Link: http://www.bing.com/partners/developers

Download: http://www.microsoft.com/en-us/download

 

PS: I'm new to JS. Please answer with code.

Share this post


Link to post
Share on other sites

I'm writing a web application for language learning and I'd like to use the Speech API from Microsoft for speech recognition. Therefore, I need to embed an ActiveX control to the web page (html file). The questions are:

 

1. How to embed this ActiveX control to the web page, I don't know the class id of that control. For a RealPlayer, I would use

<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="32" height="32"></object>
and in this case, i need the value for classid.

 

2. In case the user (client) doesn't have that activeX control, how to have it downloaded automatically (with permission)?

 

3. How to handle the events of the control.

 

Link: http://www.bing.com/partners/developers

Download: http://www.microsoft.com/en-us/download

 

PS: I'm new to JS. Please answer with code.

If i remember correctly the class id for the control depends on the object itself, for example if you develop that control with VB its class id is generated by VB when you compile and create it by using the Application Setup Wizard.

 

In case the user doesn't have that ActiveX control installed, it can be downloaded automatically and installed in his machine by using a cab file, the location from where it can be downloaded is specified by a CODEBASE parameter of the object tag, this cab file must be created by you and stored in your webserver, as you guess, the value of the codebase is an URL relative to the location of your html page.

 

To handle the events of the control you can do it as usual for example if your object is a button to handle the click event of it you can use something like this:

<html><head><title>Title</title></head><body><p>some text</p><object classid="clsid:9999-99D5-00AA00AA00" id="BtnHello"></object><script language="VBScript">Sub BtnHello_OnClick()  MsgBox "BtnHello was clicked"End Sub</script></body></html>
Please, forgive me if i'm wrong because i dont use visual basic for a long long time, so take this as a brief help.

 

Best regards,

Share this post


Link to post
Share on other sites

If i remember correctly the class id for the control depends on the object itself, for example if you develop that control with VB its class id is generated by VB when you compile and create it by using the Application Setup Wizard.

The problem is that I'm not the author of that control (Microsoft is). Do you know how to get the class id of any control store in an ocx or dll file.

Share this post


Link to post
Share on other sites

The problem is that I'm not the author of that control (Microsoft is). Do you know how to get the class id of any control store in an ocx or dll file.

You find that information on the Registry, i don't remember exactly where but i guess that it is located under the HKEY_LOCAL_MACHINE\SOFTWARE\Classes hive, inside there you will find lots of keys so you probably have to dig a lot until you find it, try to use the search function located under the Edit menu to perform this search. Also pay attention to the Interface key located under this hive because inside it you can also find the information.

 

Best regards,

Share this post


Link to post
Share on other sites

I've spent 2 hours searching but nothing found. Is there a way to get the classid right from the ocx file?

Share this post


Link to post
Share on other sites

I've spent 2 hours searching but nothing found. Is there a way to get the classid right from the ocx file?

Since a few years i dont programming with VB, so, my apologies PureHeart because the path that i told you from where to search is partially wrong, the correct place to search for the CLSID of an ocx file is located at

 

HKEY_LOCAL_MACHINE\SOFTWARE\Classes

 

inside there search for the ActiveX control by using it's file name as the parameter, for example if your ocx is named MyOcx.ocx, Then, simply go to

 

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MyOcx\CLSID

 

and get the value from there.

 

In case you dont know this, generally the ocx's files are located at %WINDIR%\System32 folder.

 

Sometime ago i use an application for this situation, some system tool called Activex Pad or something like that.

 

Finally take a look for this good article: Dynamic web pages with ActiveX and VBScript.

 

Best regards,

Share this post


Link to post
Share on other sites
Classid probActivex In Html

hi,

I have a file which uses activex control with the classid tag. It runs fine when its on my machine.

however when I put the file on web server ,  the controls do not load. Thus its showing me a cross mark on my browser.

Does ne1 have an idea about this?

Any help is appreciated !

-reply by Biren

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.