Click to See Complete Forum and Search --> : ocx with parameters


pulse cap
10-21-2005, 06:53 AM
I've been trying to use an ocx for the following funcionality:
*Accept a string parameter (property)
*Start an application on the clients computer when clicked

I've made an ocx that does just that, and it works ok if used in a visual basic form. When I try to use it in explorer however, it refuses to accept parameters.

The following works ok, displaying the control but without any custom text
<OBJECT classid="clsid:4E6CC66E-6ABF-4AB8-8D11-CBFE030B22F0">
not working
</object>

If I add a param tag the control is simply not displayed, I get no message, and no alternate text.
<OBJECT classid="clsid:4E6CC66E-6ABF-4AB8-8D11-CBFE030B22F0">
not working
<param name="path" value="somepath" />
</object>

I'm thinking it's got to do with security settings, but if I set explorer to allow everything I still get the same result. What should I do?

I also tried setting the property with a javascript btw, and got an error saying there's no such property.

edit:
another thing, I can pass paramaters to the standard microsoft controls using the same syntax, so I'm pretty sure it's something about the security settings.

pulse cap
10-21-2005, 09:03 AM
No luck yet..
I'd be happy with anything that displays a text string specified in the html and, when clicked, opens an image (in a folder availible locally) with a specific program.

ccoppenbarger
11-03-2005, 01:57 PM
Try specifying the mime type, such as application/pdf or application/x-shockwave-flash
Here's the code:
<object type="<em>mime-type</em>" data="src.ext">
<param name="src" value="src.ext" />
</object>

Maybe that will help.
A list of mime types can be found at http://www.iana.org/assignments/media-types/