Olecontrol, activex

Hi,

I can’t figure out how an Olecontrol is used.
I inserted an Olecontrol object in a window and selected LogicNp Fileviewer from the list that appears.
I see its Program ID filled in correctly.
Now I’d like to set a property of this object called “CurrentFolder,” but it doesn’t appear among the proposed properties and methods.
How do I set or launch the methods of an Olecontrol?
Thanks

I think OLE/ActiveX components don’t have their methods/properties autocomplete. They’re callable, they just don’t show up in the list.

1 Like

Hi Andrew,

It may be as you say,

but by valuing one of its properties Xojo does not recognize it during program execution.

I think it should be more like described in the lang.ref.:

  Var v As Variant
  Var params(1) As Variant

  params(1) = myfpath
  v = obj.Invoke("CurrentFolder", params)

Hi Sascha,

First of all, thanks for your help.
As you can see from the image, when I try to launch it, it gives me an error because the “Invoke” event doesn’t seem to exist.
I’m wondering if I’m doing something wrong when writing the command.

Use OLEContainer1.Content.Invoke

Ok Sascha.
This way, it doesn’t throw any errors.
It gives me an error at runtime because it probably can’t digest the data path I pass to it. I’ll check now.
Thank you so much

1 Like