MImgLoadFromModule

Functions ››
Parent Previous Next

hImage = MImgLoadFromModule( sModule, nType, nRes, nFrame )

Loads an image from the resources of a module, e.g. a DLL or an EXE.

Parameters
sModule
String: The name of the module.

nType
Number: Specify MIMG_TYPE_ICO to load an icon resource or MIMG_TYPE_BMP to load a bitmap resource.

nRes
Number: The resource to load:

Positive value

Resource position. The function steps through the resources and loads the resource at the specified position, e.g. if you want to load the first resource, specify 1.

Negative value

Resource ID. The function loads the resource with the ID equal to the absolute value, e.g. if you want to load the resource ID 17, specify -17.

nFrame
Number: Frame number. See About Frames for further information.

Return
Number: Handle of the image or 0 if an error occurs

Example
In this example the second frame of the icon with the resource ID 152 is loaded from shell32.dll:

Set hImage = MImgLoadFromModule( "shell32.dll", MIMG_TYPE_ICO, -152, 1 )

See also
Load functions

Created with the Personal Edition of HelpNDoc: Single source CHM, PDF, DOC and HTML Help creation