Northwoods.Go Assembly > Northwoods.Go Namespace > GoImage Class : LoadImage Method |
Image
.The normal behavior is to try to use the Index value, if non-negative, to find an Image in the ImageList. If there is no ImageList, we try using the DefaultImageList.
If the index value is negative, we use the Name to get an Image object from the ResourceManager. If there is no ResourceManager, we try using the DefaultResourceManager, and if that fails, we try treating the name as a filename.
The resulting Image is normally cached by this object as the Image property. If it loads the image from a file, the file may remain locked until the image is garbage collected.
If an exception occurs trying to load an image, the message is sent to trace listeners. Also, if ThrowsExceptions is true, the catch handler will rethrow the exception. If the Index is out-of-bounds for the ImageList, or if the Name is not found in the ResourceManager, this will fail silently--no exception is thrown.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2