?
Solved

Executing ActiveX form

Posted on 1998-12-01
5
Medium Priority
?
230 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 150 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

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
Suggested Courses

752 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