ActiveX weirdness

M

mmedved

I ran into a problem using a custom ActiveX I wrote in VB 2005.

It has a property that is "indexed" - that is, it has a parameter and
needs to be addressed as (Index) - kinda like this:

MyActiveXControl.MyProperty(Index)

The thing is, VB2005 refuses to recognize that this property exists.
Other - non-indexed - properties work ok, and show up in the little
helper window as I type in the code, but the indexed properties do
not
show up and do not work. VB 2005 refuses to see them.

Anyone know the workaround?
 
P

Patrice

Please clarify. First, if you created a control in VB 2005 there is no need
to register it as an ActiveX control to consume it in VB 2005. You could
consume directly the control in .NET so that you don't have to get over this
Dotnet-ActiveX-Dotnet bridge (or do you tell this is an "ActiveX" control by
analogy with the past and it is actually a .NET control ?)

Have you tried to create the smallest sample that would show the problem ?
When you expect something to work it's easier for us to see what you have
done rather than to imagine how it could have been wrongly done. What
happens if you type and compile ? Also make sure you don't use an old
version that wouldn't have yet this property ? (the esiest way is lkely to
have 2 projects in your solution and to reference the control project from
your client application project).
 
A

Armin Zingler

I ran into a problem using a custom ActiveX I wrote in VB 2005.

It has a property that is "indexed" - that is, it has a parameter
and needs to be addressed as (Index) - kinda like this:

MyActiveXControl.MyProperty(Index)

The thing is, VB2005 refuses to recognize that this property exists.
Other - non-indexed - properties work ok, and show up in the little
helper window as I type in the code, but the indexed properties do
not
show up and do not work. VB 2005 refuses to see them.

Anyone know the workaround?

I guess it has been replaced by

MyActiveXControl.set_MyProperty(Index)
MyActiveXControl.get_MyProperty(Index)


Armin
 
M

mmedved

Please clarify. First, if you created a control in VB 2005 there is no need
to register it as an ActiveX control to consume it in VB 2005. You could
consume directly the control in .NET so that you don't have to get over this
Dotnet-ActiveX-Dotnet bridge (or do you tell this is an "ActiveX" control by
analogy with the past and it is actually a .NET control ?)

The control is written in Delphi. I have actually given up and changed
the
properties (which were read-only anyway) to methods. Those are
recognized
inside VB.NET and work.

Thanks
 
P

Pierre

Sorry I thought you were saying that you wrote the control using VB 2005.

See Armin response and I would use the object browser to look at all what
this control provides.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top