Solved

ActiveX Param Tag

Posted on 2004-10-20
6
572 Views
Last Modified: 2010-04-05
I am making an activeX control in delphi and would like to pass a parameter to it called Source.

If I use this in my HTML file to test the activeX, the controls property isnt set:

<OBJECT classid="CLSID:7B908D5D-6919-436A-A8C1-4C154233C1EF" name= "msapp" width="400" height="300">
  <PARAM name="Source" value="http://www.burtonsoftware.co.uk/MediaStudio/TestProject.cwp"/>

<embed src="http://www.burtonsoftware.co.uk/MediaStudio/TestProject.cwp" type="application/mediastudio" width=400 height=300></embed>
</OBJECT>

However, if I use this for the BODY tag it works.

<body onload='msapp.Source="http://www.burtonsoftware.co.uk/MediaStudio/TestProject.cwp";'>

I need my ActiveX control to get the variable from the PARAM tag, not the onload event. Is there anything I must do to my control to make this work? or is it a problem with the HTML? I can upload the source to my activeX control if it is needed.
0
Comment
Question by:paulb1989
  • 3
  • 3
6 Comments
 
LVL 1

Expert Comment

by:vacerose
ID: 12360501
try setting the codebase attribute of the OBJECT tag to the URI of your control

<OBJECT classid="CLSID:7B908D5D-6919-436A-A8C1-4C154233C1EF" name= "msapp" width="400" height="300" codebase="http://www.burtonsoftware.co.uk/MediaStudio/TestProject.cwp">

I think your OBJECT tag is being overridden by the EMBED tag becuse the codebase is not set
0
 
LVL 1

Expert Comment

by:vacerose
ID: 12360570
sorry, if the cwp file is not the activex control code you need to set the codebase to the control URI.

For example, if you are deploying as a cab
codebase="http://myserver/path/mycontrol.cab">

or ocx
codebase="http://myserver/path/mycontrol.ocx">
0
 
LVL 5

Author Comment

by:paulb1989
ID: 12361011
Nope thats not it...

I have uploaded my ActiveX control and added the URL as the codebase, but still nothing...

Here is my test page:
http://www.burtonsoftware.co.uk/Test.htm

For the activeX to work, you will need the following DLL file placed in your system32 folder aswell:
http://www.burtonsoftware.co.uk/downloadmsr100
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 5

Author Comment

by:paulb1989
ID: 12361069
Forgot to mention, when loaded the ActiveX will show a loading page and download http://www.burtonsoftware.co.uk/MediaStudio/TestProject.cwp into a string which is read by the DLL to create some objects on a form, which will be a child form of the ActiveX control.

If the ActiveX works, the loading project page will be replaced by some objects after the file is downloaded. The file is 128k so it shouldnt take too long.
0
 
LVL 1

Accepted Solution

by:
vacerose earned 125 total points
ID: 12363364
Here we go.  I loaded your ActiveX control locally and noticed the Source property was Write Only.

I was able to recreate the problem with my own test control with a Write Only property. Basically it was ignoring the value from the PARAM tag.  I deleted the property and recreated it as a Read/Write property and then I was able to set the value successfully using the PARAM tag.

So apparently the PARAM tag does not support Write Only activex control properties.
0
 
LVL 5

Author Comment

by:paulb1989
ID: 12367142
Thanks :)

That worked
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

760 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

18 Experts available now in Live!

Get 1:1 Help Now