Solved

Passing parameters to an ActiveX  Form (ocx)

Posted on 2003-11-13
3
1,293 Views
Last Modified: 2012-05-04
Hi ,

  can one pass parameters to an ActiveX Form (ocx) when it's embeded in a web page ?

  i.e.
     ActiveXApplication.ocx /myparam1


  so when you embed the app in the web page and when the page loads up you can pass the ocx specific parameters ?
 
  <OBJECT ID="Test" WIDTH=32 HEIGHT=32
    CLASSID="CLSID:F9043C85-F6F2-101A-A3C9-08002B2F49FB"
    CODEBASE="http://localhost/ActiveXApplication.ocx
    #Version=1,0,0,0 /myparam">
</OBJECT>

 I need to dynamicly pass the ocx parameters to initialise it with settings every time the web page is executed. I do not know if the above
 is possable or if there is a different solution ??

  thanks

   

 
 
0
Comment
Question by:zeroimpact
3 Comments
 
LVL 9

Accepted Solution

by:
tkalchev earned 125 total points
ID: 9747231
The only way to pass parameters to the object is :

<OBJECT ID="Test" WIDTH=32 HEIGHT=32
    CLASSID="CLSID:F9043C85-F6F2-101A-A3C9-08002B2F49FB"
    CODEBASE="http://localhost/ActiveXApplication.ocx">
<PARAM NAME="P1" VALUE="100">
<PARAM NAME="P2" VALUE="15">
<PARAM NAME="P3" VALUE="abc">
</OBJECT>

The above code is setting the initial values of the parameters P1,P2 and P3 to 100, 15 and abc
0
 
LVL 5

Expert Comment

by:TRUENEUTRAL
ID: 9747811
You could write the vlues out to a text file that the ocx looked for and ran each time it was initialized.  Not the best solution, but it might work.
0
 
LVL 1

Author Comment

by:zeroimpact
ID: 9748035
Thanks   tkalchev,

  That did the trick, by Creating a P1, P2 and P3  as Published Interfaces as set properties in the code and then passing in the params
 



0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
A short article about problems I had with the new location API and permissions in Marshmallow
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

786 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