Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX on a html page: Using <param name>

Status
Not open for further replies.

psteja2000

Programmer
Feb 1, 2005
82
US

Hi,

I have a .ocx that I am calling on a html page using <object>.

The .ocx basically provides me with a container where I have a button when clicked it will connect to a server etc.
I want to take the server IP from outside the ocx.

Meaning, in my html page, I want to do
<object....>
<param name="serverIP" value="...">
</object>

in the ocx, now where do I access these params?

In the usercontrol_readproperties().
Is taht correct? for some reason it is not working and the whole ocx fails to show on the page .

What am I doing wrong?

regards,
Teja
 
This has probably already been answered, but I think you need to and a width and height property to your object tag if you have a visible control <object ... width="100" height="50">
 
Readproperties, the propertybag, writeproperties and so on are ways to permit an instance to persist its properties between instances. In particular, they are there to allow support for setting of properties in design time instances and having them persist into run time instances. In other words, if you want to draw your control in vb and set some of its properties, you have to use this mechanism, or you won't see the setting you made when you run your program. Now, you do not have to use this mechanism to set the control's properties at runtime.

It's not clear to me whether the object tag uses this mechanism to pass parameters to the control, and I can't find that information in psteja's article. I doubt that it does, though. It seems reasonable that the object tag instantiates the object and then sets its properties accoring to the values passed in the param tags.

In my experience, the ocx fails to show on the page either because there's an error in the code or because it can't find the object where it's supposed to be.

HTH

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top