Solved

ActiveX Param Tag

Posted on 2004-10-20
6
579 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

713 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