User Tools

Site Tools


icon_set_icon_.htm
Navigation:  Language Reference > 9 -  Window and Report Attributes > Window and Report Attributes >====== ICON (set icon) ====== Previous pageReturn to chapter overviewNext page

NewC7.jpg

ICON( file )

blk2blue.jpg

ICON Specifies an icon to display for the APPLICATION, WINDOW, or control.
file A string constant containing the name of the image file (.ICO, .GIF, .JPG, .PCX) or an EQUATE for the Windows standard icon to display. The image file is automatically linked into the .EXE as a resource.

The ICON attribute (PROP:ICON) specifies an icon to display for the APPLICATION, WINDOW, or control.

On an APPLICATION or WINDOW, ICON also specifies the presence of a minimize control, and must name an .ICO file as its file parameter. The minimize control appears in the top right corner of the window as an underscore. When the user clicks the mouse on it, the window shrinks to an icon without halting its execution. When an APPLICATION or non-MDI WINDOW is minimized, the icon file is displayed in the operating system's desktop; when a WINDOW with the MDI attribute is minimized, the icon file is displayed in the APPLICATION's client area.

On a BUTTON, RADIO, or CHECK control, ICON specifies an image to display as the control. The image file displays on the button face of the control. For RADIO and CHECK controls, the ICON attribute creates “latched” pushbuttons, where the control button appears “down” when on and “up” when off.

EQUATE statements for the Windows-standard icons are contained in the EQUATES.CLW file. The following list is a representative sample of these (see EQUATES.CLW for the complete list):

ICON:None No icon
ICON:Application
ICON:Question ?
ICON:Exclamation !
ICON:Asterisk *
ICON:VCRtop »
ICON:VCRrewind <;<;
ICON:VCRback <;
ICON:VCRplay >
ICON:VCRfastforward »
ICON:VCRbottom <;<;
ICON:VCRlocate ?

If the name of the icon file to assign to PROP:Icon has a number in square brackets appended to its end (IconFile.DLL[1]), this indicates the file contains multiple icons and the number specifies which to assign (using zero-based numbering). If the name of the icon file has a tilde (~) prepended to it (~IconFile.ICO), this indicates the file has been linked into the project as a resource and is not on disk.

Example:

MDIChild WINDOW('Child One'),AT(0,0,320,200),MDI,MAX,HVSCROLL,ICON('MyIcon.ICO')

         OPTION('Option'),USE(OptVar)

          RADIO('Radio 1'),AT(120,0,20,20),USE(?R1),ICON('Radio1.ICO')

          RADIO('Radio 2'),AT(140,0,20,20),USE(?R2),ICON('Radio2.GIF')

         END

         CHECK('&amp;A'),AT(0,120,20,20),USE(?C7),ICON(ICON:Asterisk)

         BUTTON('&amp;1'),AT(120,0,20,20),USE(?B7),ICON(ICON:Question)

        END

See Also:

ICONIZE

MAX

MAXIMIZE

IMM

icon_set_icon_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1