LOAD-SMALL-ICON( ) method
(Windows only; Graphical interfaces only)Loads the icon you want from a specified file for display in the title bar of a window and in the task bar only. This method can accommodate icons formatted as small size (16x16) icons, regular size (32x32) icons, or both.
The icon file might contain multiple icons. In those instances when multiple icons are in a file, the LOAD-SMALL-ICON( ) method, by default, uses the 16x16 icon, if one exists, from the file that you specified. Otherwise, it uses the first icon in the file. If it uses a 32x32 icon, it reduces its size to a 16x16 format in both the title bar and the task bar.
If the load is successful, this method returns TRUE.
Note: You cannot use this method to display a specific icon when selecting a program using ALT+TAB.Return type: LOGICAL
Applies to: WINDOW widget
smallicon-filename
A character-string expression that specifies the name of a file that contains the icon you want to load for display in the title bar of a window and in the task bar.In Windows, you can specify a URL pathname forsmallicon-filename
. If you specify a fully-qualified URL, LOAD-SMALL-ICON( ) loads the icon file directly without searching directories or URLs in PROPATH. Valid URL protocols include HTTP and HTTPS.Note: URL pathnames cannot contain the percent symbol (%). If an error exists in a URL specified on the PROPATH, the LOAD-SMALL-ICON( ) method continues searching with the next PROPATH entry.If you specify URL pathnames on thePROPATH
and your application repeatedly uses the LOAD-SMALL-ICON( ) method with a URL pathname, you can improve performance by using the SEARCH function once to determine the full URL pathname to the directory containing the icon files. Use this value to create a fully-qualified URL pathname forsmallicon-filename
and avoid repeated searches of the PROPATH.If you specify an empty string ("") forsmallicon-filename
, this method removes the most recently loaded icon.n
For example, the following invocation of LOAD-ICON( ) finds the second icon in the icon file
file.ico
and loads it:
The following invocation removes the previously loaded icon:
The LOAD-SMALL-ICON( ) method is only available in Windows 95 and NT Version 4.0. If you try to use it with any other platform, this method returns FALSE.
You typically use this method to load a small icon for an ABL window to display in its title bar or on the taskbar. ABL has no means of specifying a default icon for this purpose, and Windows provides a generic icon if you do not specify one.
.NET forms allow you to specify a default icon that works for this purpose using the form Icon property, which in ABL is provided by the Progress.Windows.Form class. You can then change this property as required for different uses.
You can maintain uniform icons across .NET forms and ABL windows in an application by using this method to load the same small icon you are using to set the Icon property for .NET forms.
See also: LOAD-ICON( ) method
OpenEdge Release 10.2B
|