Solved

ActiveX Param Tag

Posted on 2004-10-20
6
578 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Machine not responding during CopyFile() 3 103
delphi prevent click fast 2 238
delphi exception 7 68
MS Access from Delphi 31 59
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

790 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