GET DOCUMENT ICON

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 6.7


GET DOCUMENT ICON (docPath; icon{; size})

ParameterTypeDescription
docPathStringName or path of document to get icon,
or Empty string for standard Open File dialog box
iconPicturePicture variable or field
Document icon
sizeLongintSize of the returned picture (in pixels)

Description

The GET DOCUMENT ICON command returns in the 4D picture variable or field icon, the icon of the file whose name is passed in filePath. The file can be of any type (executable, document, shortcut or alias...). However, the command does not return folder icons.

filePath should contain the full pathname of the file. You can also pass the file name only, in this case the file must be placed in the database current working directory (usually, the folder containing the database structure file).

If you pass an empty string in filePath, the standard Open File dialog box is presented. The user can then select the file to read. Once the dialog box is validated, the Document system variable contains the full pathname to the selected file.

Pass in icon a 4D picture field or variable. After the command is executed, this parameter contains the icon of the file (PICT format).

The optional size parameter allows you to set the dimensions in pixels of the returned icon. This value actually represents the side length of the square including the icon. Icons are usually defined in 32x32 pixels ("large icons") or 16x16 pixels ("small icons"). If you pass 0 or omit this parameter, the largest available icon is returned.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next