Skip to content

Get_Resource_Name Command

See Also: Direct_Input, Set_Resource_Library, Include_Resource, Register_Resource, Total_Resources

Purpose

To retrieve the name of a resource in the current resource library.

Note

This command is a character-mode legacy command that handles embedding of files as resources. This command does not work on embedded resources like bitmaps, icons, and version information that is compiled into a DataFlex application. See Resources for embedding these types of resources.

Syntax

get_Resource_Name
    integer
to
    resource_name

Argument Explanation

  • integer: The number of a resource ID.
  • resource_name: A string variable into which the name of the resource ID is returned.

What It Does

Get_resource_name allows you to determine the name of a resource ID. Resource IDs have integer values starting with one and continuing sequentially to the total number of resources in the current library.

integer i res_type
string res_name

for i from 1 to total_resources
    get_resource_name i to res_name
    get_resource_type to res_type
    showln (pad(res_name, 30)) res_type
loop

This simple example lists all the resources in the current library of the program running, followed by the resource type of each.