Method XbpIcon():load() Foundation

Loads an icon from a resource file linked to the executable file.

Syntax
:load( [<cDLLname>], <nID>, [<nWidth>], [<nHeight>] ) --> lSuccess
Parameters
<cDLLname>
The optional parameter <cDLLname> specifies the name of a DLL file as a character expression. This is used if the icon is linked as a resource to a DLL file rather than to the EXE file. If <cDLLname>is not specified, the resource is loaded from the EXE file.
<nID>
<nID> specifies the numeric resource ID and must be included. This is the resource ID used to link the icon with the executable file.
<nWidth>
The optional parameter <nWidth> contains a numerical value that specifies the width of the icon to load. If images of several sizes are defined in the icon resource, the image whose width most closely matches that in <nWidth>is selected. If the icon resource contains only a single image, the image is scaled to match the width requested. Parameter <nWidth> defaults to 32.
<nHeight>
The optional parameter <nHeight> contains a numerical value that specifies the height of the icon to load. If images of several sizes are defined in the icon resource, the image whose height most closely matches that in <nHeight>is selected. If the icon resource contains only a single image, the image is scaled to match the height requested. Parameter <nHeight> defaults to 32.
Return

This method returns .T. (true) when the icon could be loaded, otherwise it returns .F. (false).

Description

The :load() method loads an icon linked as a resource to the executable file. The icon itself must have been declared in an RC file that is linked to the executable file using the resource compiler RC.EXE. Normally it is linked to the EXE file, but it can also be linked to a specified DLL file.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.