1653 ActiveX, OCX, OleAuto: OCX methods not available

VERSIONS: P9 and later
SUBJECT: OCX methods not available
BY: TONY MCGUIRE
Date: 22 November 2001

PROBLEM:
I can add a Corel SVG viewer object to a form, and even display a graphics from a local URL in it. But in the object explorer, or in the code windows, I don't have access to the objects methods and callbacks, although this works fine with other OCXs.


Whether you can see the OCX methods/properties/events at design time is totally up to the person who created the OCX. A LOT of ocxs don't expose them at design time, at least not so Paradox can see them. For VB and other programming languages this isn't an issue; for Paradox it sometimes is. If the OCX isn't visual (if you don't have to use the ocx to display something), I strongly recommend opening and using it from a library.

Just in case you aren't aware of it:

To view the ocx/COM controls registered on your system:
var
   oa   oleauto
   dy   dynarray[] string
endvar
enumautomationservers(dy)
dy.view()
(right side of dynarray display is the internal name used below)

To see the properties/methods/events available in a control:
var
   oa  oleauto
   dye,
   dyp,
   dym  dynarray[] string
endvar

oa.open("ocx.internalname.1")  ; some you include the .1, some not
oa.enumproperties(dyp)
oa.enummethods(dym)
oa.enumevents(dye)

oa.close()
dyp.view("properties")
dym.view("methods")
dye.view("events")

To index