OCX Control in VB.Net Missing Methods

  • Thread starter Elliot M. Rodriguez
  • Start date
E

Elliot M. Rodriguez

A 3rd party OCX that I am using in a VB.NET app is missing several
properties and methods in Intellisense. I know they are missing because I
have the complete API reference for the OCX, and if I use the same OCX in a
VB6 standard EXE, the items I want show up. If I try to add them anyway, I
get precompiler errors.

I can only guess at a problem with Automation... Are there any general
reasons why a control's interfaces will show up incomplete?
 
J

Jeff Molby

Does the control utilize multiple interfaces? If so, to use the members on
the other interfaces, you'll have to either Dim the control as the other
interface or use the CType function to gain access to the other methods.

HTH
 
E

Elliot M. Rodriguez

Jeff:

Thank you for the reply. The control doesnt implement any other interfaces.
Thats what makes this so damn confusing.
 
D

Dick Grier

Hi,

The control has various Procedure Attributes (see the Tools/Procedure
Attributes dialog in VB6 when developing an ActiveX control).

There is a Hidden attribute that will hide it from Intellisense, and if this
attribute is not set, it still may be "Don't show in the Property Browser."
If either of these are used, then Intellisense will not display it.

Now, I don't know if this explains the behavior that you are seeing (I
suspect it is the second thing above) -- and there also may be a "funny" in
..NET (I have trouble with Intellisense with some native .NET controls,
too!).

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.
 

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