Results 1 to 25 of 25

Thread: Adding an ActiveX control to a web page?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Leeds, UK
    Posts
    287

    Smile

    Hi,

    I would like to know the code to add an activeX control called time.ocx to my web page. Any ideas? Thanks
    rino_2
    Visual Basic, HTML
    Please Visit my Site: Richard's VB Site

  2. #2

  3. #3
    Guest
    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:
    Code:
    <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).

  4. #4
    Junior Member
    Join Date
    Jul 2000
    Location
    Liverpool UK
    Posts
    23

    Angry So whats the point in ActiveX

    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?

  5. #5
    Addicted Member
    Join Date
    May 2000
    Location
    Grand Rapids, MI
    Posts
    231
    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.
    -Karl Blessing aka kb244{fastHACK}
    [email protected]

  6. #6
    Hyperactive Member compuGEEK's Avatar
    Join Date
    May 1999
    Location
    Mpls,MN,USA
    Posts
    281
    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.

  7. #7
    Addicted Member
    Join Date
    May 2000
    Location
    Grand Rapids, MI
    Posts
    231
    you however are still limited to html and vbcript functions.
    -Karl Blessing aka kb244{fastHACK}
    [email protected]

  8. #8
    Hyperactive Member compuGEEK's Avatar
    Join Date
    May 1999
    Location
    Mpls,MN,USA
    Posts
    281
    Not with webclasses kb244; IIS applications are driven by
    ASP.

  9. #9
    Addicted Member
    Join Date
    May 2000
    Location
    Grand Rapids, MI
    Posts
    231
    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.
    -Karl Blessing aka kb244{fastHACK}
    [email protected]

  10. #10
    Guest
    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.

  11. #11
    Hyperactive Member compuGEEK's Avatar
    Join Date
    May 1999
    Location
    Mpls,MN,USA
    Posts
    281
    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.

  12. #12
    Addicted Member
    Join Date
    May 2000
    Location
    Grand Rapids, MI
    Posts
    231
    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)
    -Karl Blessing aka kb244{fastHACK}
    [email protected]

  13. #13
    Addicted Member
    Join Date
    May 2000
    Location
    Grand Rapids, MI
    Posts
    231
    Also DHTML is yet Again simple HTML, that allows you to dynamically control the content of the page.
    -Karl Blessing aka kb244{fastHACK}
    [email protected]

  14. #14
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  15. #15
    Guest
    you mean ppl that use netscape navigator gold 3 on mac os 7 on like a quadra or summit?

    let them be damned!! >:]

  16. #16
    Lively Member
    Join Date
    Nov 1999
    Location
    Melbourne, Victoria, Australia
    Posts
    126

    Wink

    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/~pri...imeControl.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.
    Regards,

    Paul Rivoli
    ---------------------
    [email protected]
    http://members.dingoblue.net.au/~privoli

  17. #17
    Hyperactive Member compuGEEK's Avatar
    Join Date
    May 1999
    Location
    Mpls,MN,USA
    Posts
    281
    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.

  18. #18
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  19. #19
    Lively Member
    Join Date
    Nov 1999
    Location
    Melbourne, Victoria, Australia
    Posts
    126

    Exclamation

    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 ?
    Regards,

    Paul Rivoli
    ---------------------
    [email protected]
    http://members.dingoblue.net.au/~privoli

  20. #20
    Addicted Member
    Join Date
    May 2000
    Location
    Grand Rapids, MI
    Posts
    231
    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"
    -Karl Blessing aka kb244{fastHACK}
    [email protected]

  21. #21
    Hyperactive Member compuGEEK's Avatar
    Join Date
    May 1999
    Location
    Mpls,MN,USA
    Posts
    281
    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?

  22. #22
    Guest
    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).

  23. #23
    Addicted Member
    Join Date
    May 2000
    Location
    Grand Rapids, MI
    Posts
    231
    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.
    -Karl Blessing aka kb244{fastHACK}
    [email protected]

  24. #24
    Hyperactive Member compuGEEK's Avatar
    Join Date
    May 1999
    Location
    Mpls,MN,USA
    Posts
    281

    Exclamation Quick Work Around

    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/...e/authcode.asp.

    You can then generate your own self-signed certificate
    to sign your control.









  25. #25
    Lively Member
    Join Date
    Nov 1999
    Location
    Melbourne, Victoria, Australia
    Posts
    126

    Lightbulb

    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?
    Regards,

    Paul Rivoli
    ---------------------
    [email protected]
    http://members.dingoblue.net.au/~privoli

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width