OCX Noob Question. Please help.

cthulhugeek

New Member
Hi,

I am using on OCX active x object for the first time. It looks straight forward but I can not get it to work.

Here is the load:
ASSIGN
chTagViewer = TagViewer:COM-HANDLE
UIB_S = chTagViewer:LoadControls( OCXFile, "TagViewer":U)

Now when I look at the object viewer to see what I need to do to set tokenfilename it says this:

<com-handle>:TokenFilename [ = Character-Var ].

So, I was assuming I could do this:

chTagViewer:TokenFilename = "p:\inventory\test.tok".

And it would pull in the token file and view it in the window. If I force it in using the property editor it views it fine. So I know the OCX is working. I do notice when I pull up the com object viewer for the OCX I see that there are things called com objects listed and under each one of those are the properties. The com object with the ocx that has tokenfilename is IMTCTokViewX. I tried pointing a com handle directly to it, but does not seem to work, not sure if that is what I am missing? Any thoughts?

I am using Progress 9.1E on Windows 2003 Server with XP Office clients.

Thanks,
Don
 

curly

New Member
chTagViewer variable is handle to OCX container – not to OCX itself.

Use the following syntax to assign OCX properties:
<ocx-container-com-handle>:<ocx-name>:<property-name> = <new value>

Assuming that the name of your TagViewer OCX is “TagViewer” your assign statement should look like:

chTagViewer:TagViewer:TokenFilename = “p:\inventory\test.tok”

Regards,
Marian
 
Top