PowerBuilder doesn't have an equivalent function. What I've been able
to do is use an ImageList control to load the image and then use that
to supply the image to an ActiveX control.
On Fri, 11 Apr 2008 19:01:35 -0700 (PDT), CallRunner
>I'm attempting to load a .bmp image into an OLE object using
>PowerBuilder 11.1. The OLE ActiveX is AddFlow5 and I am using it to
>graphically represent links between entities - people, organisations,
>addresses, vehicles, telephones, etc.
>Documentation for AddFlow5 gives an example in VB script to load the
>relevant 'picture' into a node, ie,
>SET node.picture = LOADPICTURE("C:\images\person.bmp").
>I cannot find a suitable equivalent in PB 11 to either 'SET' or to
>The developer of AddFlow suggested I try:
>uo = Create OLEObject
>li_Ret = uo.ConnectToObject("c:\picture.gif")
>The return value shows the picture loaded to the OLE object, uo,
>(wouldn't work for a bitmap)
>but I get a runtime error on reaching node1.Picture(uo) of
>"Error calling external object function picture at line ..."
>I've also tried loading a .bmp picture into a BLOB but, again, the
>routine fails on "node1.Picture(lblb_picture)", this time with the
>runtime error of "Invalid parameter type calling external object
>picture at line ...".
>Assigning either the blob or ole value with an equal sign, in keeping
>with the document loadpicture example, gives the error "Type mismatch
>accessing external object property picture at line ..."
>I've used PB's object browser to look for functions etc in the OLE but
>could not find anything
>that appeared suitable.
>(PB does have a 'loadpicture' function but that is for a PB InkPicture
>control and does not work with AddFlow)