Solved

Executing ActiveX form

Posted on 1998-12-01
5
210 Views
Last Modified: 2010-04-09
How can I execute one ActiveX form within the browser?
What I need to include in my HTML page to run this OCX?

Regards.
0
Comment
Question by:sergio_2001
  • 3
  • 2
5 Comments
 
LVL 1

Expert Comment

by:bbangerter
ID: 1840145
The easiest way is to use Microsofts Design Time ActiveX Control Pad (available for download from Microsofts site - sorry I don't know the exact URL to get to the correct download page).

But you'll end with somethink like the following in your HTML page

<OBJECT ID="myControl" WIDTH=100 HEIGHT=51
 CLASSID="CLSID:F0A59CA5-B599-11D0-836B-0004ACFCB2B9">
    <PARAM NAME="myParam1" VALUE="myValue1">
    <PARAM NAME="myParam2" VALUE="myValue2">
</OBJECT>

The ClassID is the tricky part.

This is probably going to be information than you want or need, but here goes....

Using the ActiveX control pad is the easiest way to get the ClassID.

But if you have Visual Basic you can include the control in a VB form, then open the .frm file in a text editor and look for a line like
Object = "{F0A59CA5-B599-11D0-836B-0004ACFCB2B9}#2.0#0}"; "myControl.ocx"
The part between the {}'s is your ClassID.

You can also run RegEdit from 'Start... Run... RegEdit' and then do a search (ctrl-f) on the name of your control (e.g., myControl).  The very first entry in the registry should show the class ID in {}'s.

The hardest method is using VC++.
If you are using VC++ you can insert the control into a project, open the newly generate header file, and look for something like.
static CLSID const clsid
                  = { 0xf0a59ca5, 0xb599, 0x11d0, { 0x83, 0x6b, 0x0, 0x4, 0xac, 0xfc, 0xb2, 0xb9 } };
            return clsid;

You'll note that by stripping off all of 0x and inserting dashes in the correct character positions you end up with
F0A59CA5-B599-11D0-836B-0004ACFCB2B9
remembering that this last section is a 12 character code, and may need leading zeros.

Presumably other Microsoft products that are capable of working with ActiveX controls have similar methods of determining the Class ID.
0
 

Author Comment

by:sergio_2001
ID: 1840146
bbangerter,

Your comment is correct. That's what I want.
Please send-me the answer to grade you.

Note: I done um activeX form using delphi. Using your answer I got to introduce the activex form in the html page but the form don't show properly. What should be?!?!?!?

thanks
0
 
LVL 1

Accepted Solution

by:
bbangerter earned 50 total points
ID: 1840147
Answer to above for getting the ActiveX control to work.

As for the form not showing properly, could you clarify what it is doing?
0
 

Author Comment

by:sergio_2001
ID: 1840148
I can see the space used for the activeX within the browser but I just see that litlle default icon at upper left side.
I hope to be clear....
thanks...
0
 
LVL 1

Expert Comment

by:bbangerter
ID: 1840149
Yes I do know what you mean, now if I can just remember how to fix it :).

What ActiveX control are you trying to use?  Is it a custom one or one built by say Microsoft or IBM or some other 3rd party developer?  Are there any properties within the control that determine whether or not to display the user-interface?  Any sizing properties to determine the size of the UI?

Also, just realized I'm getting charged 5 points to come in here and make comments (no big deal), but if we could move this to either a new question in experts-exchange or to private email (fanatic@aros.net) I'd appreciate it.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
ust html in ms/access WebBrowswer 11 41
Newbie CSS questions 4 25
Tag input html 4 37
Urgent need help ASAP With CSS 5 20
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now