Solved

ActiveX Param Tag

Posted on 2004-10-20
6
576 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

803 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