Solved

Passing parameters to an ActiveX  Form (ocx)

Posted on 2003-11-13
3
1,260 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
thread-safe code in c++ 2 69
dividesSelf challange 15 76
Replace a tag with sed 2 41
How can i compile this github project?? 2 39
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.
This is about my first experience with programming Arduino.
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 …

762 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

12 Experts available now in Live!

Get 1:1 Help Now