ImageMan ActiveX
Loading Images from Disk

The image control supports loading images in a variety of file formats from disk. If you know the name of the image you wish to load you can set the %Picture:IMACTX8~ImageControl~Picture% property to a string containing that name. The following code fragment loads an image called sample.tif:

 

ImageControl1.Picture = "C:\SAMPLE.TIF"

 

If you want to display a File Open dialog containing the names of images that can be loaded you can invoke the %GetFileName:IMACTX8~ImageControl~GetFileName% method. The control will display a dialog and show those images that can be loaded. If the user Selects a filename and Selects the OK button the image will be loaded and the GetFileName method will return TRUE. For instance:

 

If ImageControl1.GetFileName Then

' User selected an image

' Now lets do something with it

End If

 

If the control cannot load an image then a runtime error will be generated by the control.

 

Loading Images from the Internet

Loading Images Embedded in other Files

Loading Images from Memory

 

 


© 2014 Data Techniques, Inc. All rights reserved.

Submit feedback on this topic