Discussion Locked

Imaging for windows - Power Builder

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Hi! I'm having problems with the imageEdit.OCX (Imaging for Windows) control, I want to see images in my Power Builder application and I need to handle them into my app not out of it, and my problem is I can not create an object file in order to intance the methods and functions of the OCX component.. can anybody help me ????

1 reply

by reivajj23

this is the code I'm trying to use in order to create the object.. i can use the ole_control but i need to use a file object in order to use more methods... thank you

oleobject ole_appli
oleobject ole_object

//create a local ole object
ole_appli = create oleobject

//connect the ole object to imaging

If ole_appli.ConnectToNewObject("Imaging.application") <> 0 Then
Messagebox("OLE Error","Can not connect with Imaging")
Return
End If

ole_object = ole_appli.CreateImageViewerObject(1)
//Set the application's TopWindow property to TRUE (stay on top)
ole_appli.TopWindow = True
//Call the ImageFile object Open Method to display page 1 of myimage.tif
ole_object.Open "C:\myimage.tif", True, 1, False
//Create and rotate one Page object
ole_appli.Pages(1).RotateLeft

//disconnect the object
ole_object.disconnectobject()

//free the memory
destroy ole_object

This discussion is closed to new replies.