Click to See Complete Forum and Search --> : Adding an ActiveX control to a web page?
rino_2
Aug 11th, 2000, 04:03 PM
Hi,
I would like to know the code to add an activeX control called time.ocx to my web page. Any ideas? Thanks
compuGEEK
Aug 11th, 2000, 05:13 PM
http://forums.vb-world.net/showthread.php?threadid=26183
Actually that's not the proper way to use ActiveX controls on a web page.
Basically, you embed a control on your page like this:
<object classid="clsid:{Unique Class ID of ActiveX control}">
<param name="propertyname" value="propertyvalue">
</object>
Now...see where I've put "{Unique Class ID of ActiveX control}"? Well that's a unique string that identifies your control. Now if you just bung your control on a page and expect someone else to use it then their computer will have no idea what control this string refers to.
There are two ways to get around this...
1) As cuggested above, you could manually register the control on the person's machine (possibly using a setup program.
2) You get a security sertificate from which will tell IE that your control is safe (not a virus etc) and IE will then register download and register the control for you.
3) Give up.
I took option 3). :(
xensoft
Aug 14th, 2000, 08:54 AM
What's the point in having the facility to embedd controls in a webpage if it never works because of security or need to download activeX? It would be really good if it was easy to put on the web so why doesn't someone design a way to get round all the problems, and why did Microsoft bother in the first place?
kb244
Aug 14th, 2000, 09:45 AM
I think you underestimate it's capabilities, I may not be a major fan of ActiveX controls as in being in a browser, but ActiveX serve a very good purpose, it's cross exposible to any of the microsoft languages, you can easily create a control in a language of your choice and use it in another language. As with webbrowsers, if you have IE, you can expose all functions and features of the control to the VB-Script, thus giving your website a much greater capability, than to just rely on HTML and limited VBScript.
compuGEEK
Aug 14th, 2000, 10:00 AM
I've found that a nice alternative to ActiveX controls
is the webclass designer in VB6.
It's scalable across all platforms and unlike ActiveX
controls, there is no actual download and install of
components. It's presented as HTML.
kb244
Aug 14th, 2000, 10:08 AM
you however are still limited to html and vbcript functions.
compuGEEK
Aug 14th, 2000, 11:17 AM
Not with webclasses kb244; IIS applications are driven by
ASP.
kb244
Aug 14th, 2000, 11:19 AM
You never mentioned ASP, and ASP in any form is going to be more compatible then client side ActiveX also you can use ActiveXs on the serverside, I'm refering to client side. Other than Java (and any other form of plugin) ActiveX is the only client side control that gives you more capabilities than plain VBscript/JavaScript or HTML.
My VB lecturer (gee...that was a joke...was a 2 week part of my HNC and I knew loads more than her!) couldn't get her head around that.
She asked me how to stick an activex control on a web page (I think she's just seen the term written down like 10 mins before! :) ). When I told her and also told her why it was seldom done she just replied "Well what's the point in that then? Why bother with ActiveX controls. You can't do anything with them."
T tried to explain to her exactly what you've just said, kb244, but she didn't understand. :(
compuGEEK
Aug 14th, 2000, 11:29 AM
You should stick to ActiveX if you're looking for client
side processing.
Yet another alternative to a client side ActiveX control is a DHTML app (it too, is client side), but again, IE 4.0 and higher is required and is the only browser that will fully support it.
kb244
Aug 14th, 2000, 11:34 AM
Well I guess if all you are after is static presentable HTML then there is no point, if you are however working with Analytical data, as well as being able to show a quickly sortable database of the report they requested, that had about 3 thousand records, and you could scroll, modify, update and do other thing, then I guess there is a need for ActiveX on that sense. Unless you actually work with ActiveX, you'll find that ActiveX controls arnt just something you stick on a webpage (that's actually the small part) but it allows you to create anything in VJ++. VC++, VB, etc and be able to use that same functionality in another language, for example, you could write some heavy number crunching activeX Dll in VC++, then create a front end graphic interface in VB, and Stick the ActiveX dll in the VB app, and have it interact that way. Same Way with Webbrowsers, take some heavy programming capabilities, and jam it into a Webpage to allow your VBscript to interact with it, the benefit of an ActiveX is good if your main audience is using IE, and you yourself do not have access to a Server that allows serverside componets or web applications. Even if you had Server Side capabilities, ActiveX would still give you a huge window to work with even on the serverside code, I have written many ActiveX dlls for ASP for both speed and security reasons(it's very secure if you run it off the server and not the client)
kb244
Aug 14th, 2000, 11:37 AM
Also DHTML is yet Again simple HTML, that allows you to dynamically control the content of the page.
parksie
Aug 14th, 2000, 03:46 PM
Although you have to bear in mind that all of this limits you to IE4 or above on a Windows machine. This effectively alienates all those who a) Use a Mac, b) Don't use Windows on their PC, c) Don't want a browser that sticks fingers into every part of your system.
you mean ppl that use netscape navigator gold 3 on mac os 7 on like a quadra or summit?
let them be damned!! >:]
privoli
Aug 15th, 2000, 03:11 AM
Dear all,
Ive made some .OCX's they work and run correctly.
http://members.dingoblue.net.au/~privoli/WebPaint.HTM
http://members.dingoblue.net.au/~privoli/UptimeControl.HTM
http://members.dingoblue.net.au/~privoli/Project2.HTM
However, when someone views the page the OCX loads etc.. but the ActiveX control is unsigned and therefore IE think it's unsafe. Does anyone know how to mark these controls as safe and give them a digital signature? I've checked MSDN and found some stuff, but none of it made sense...
If you want to test those controls set your Internet Zone to the level of Low and it should work fine.
compuGEEK
Aug 15th, 2000, 01:26 PM
In order to sign your control, you have to get a certificate
from VeriSign (or another certificate place).
http://digitalid.verisign.com/developer/ms_pick.htm
I'd get a class 2 certificate; It's the cheapest option.
Once you have that, you can sign your code. :)
parksie
Aug 15th, 2000, 02:28 PM
Yes, you need a certificate to sign it, but you can mark it as safe for initialisation and scripting without paying any money. Although I think it needs to be created in C++ for the option to be available.
privoli
Aug 15th, 2000, 08:12 PM
Dear all,
Well, I'm not going to pay $400 US to sign a few crappy Active X controls so they are marked as safe, any other ideas on how to make them marked as safe for IE4.x and 5.x ?
kb244
Aug 15th, 2000, 08:59 PM
If you could easily mark them safe without anybody's sayso, wouldnt yourself be concerned that some idiot would make an ActiveX that formats a drive, but yet you downloaded it, becase it's marked as "Safe"
compuGEEK
Aug 16th, 2000, 10:28 AM
VeriSign had a Class 2 Digital ID for individuals
who publish software for $20/year. I just checked with
their tech support and they no longer provide Class 2
Digital ID's.
They're pushing Class 3 ID's for $400/year...How lame is
that?
Privoli...tell us about that codebase tag you included on those pages...
I think that's what tells IE what to download and how to register it if it isn't already installed (assuming the control is safe or the user agrees to use it).
kb244
Aug 16th, 2000, 10:51 AM
The codebase tag is nothing more than where to download the control if the ClassID doesnt exist, for example
<OBJECT classid="clsid:25AD0F4D-6470-11D4-A66E-00105A12FDAE" name="TheObj" WIDTH="640" CODEBASE="LstHost.CAB#version=1,0,0,0">
you tell it where the Cab file is, and what version the control is, and it'll install the cab file.
compuGEEK
Aug 16th, 2000, 10:54 AM
What you could do to sign your control, is to download Authenticode for IE4 or 5, depending on what you use,
http://msdn.microsoft.com/downloads/tools/authenticode/authcode.asp.
You can then generate your own self-signed certificate
to sign your control.
privoli
Aug 16th, 2000, 11:39 PM
I have the authiticode 4.0 for ie4.0 installed, ive tried using all the programs and documents in there with no successful results at all, does anyone know how to use the authticode 4.0 to make a certificate and sign a .cab file?
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.