Set_Resource_Library Command
Obsolete
This command is obsolete. It is a legacy command intended for use in character-mode DataFlex.
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 into your application.
Purpose
To enable DataFlex programs to address resources at runtime that are in other programs or files.
Syntax
set_resource_library to fileName
Argument Explanation
- fileName: The name of the compiled file containing resources desired for the currently running program.
What It Does
set_resource_library identifies the compiled file that contains resources desired for the currently running program. The resource library in effect for any program that has not used this command is the currently running program itself.
Once this command has set the library to some other file, resources of the running program cannot be opened (assigned to an input channel by the direct_input command). If they were already open at the time this command was executed, however, they may continue to be accessed until they are closed.
fileName may be another runnable DataFlex program, but does not have to be. It need only contain a resource, either in its own source code or through the include_resource command.
When one program chains to another with the wait option, resources already open in the calling program remain open in the called program, but the resource library changes to the contents of the called program. If the seq_export option of chain is used, however, the resources of both programs remain available in the called program.
Notes
-
fileNamemust be compiled by the DataFlex compiler before it can be addressed by this command. By default, the compiler produces files with the extension.EXE.fileNameneed not have this or any particular extension, and may be renamed after compilation if it is not in fact a runnable program, to avoid confusion with other compiled files that are runnable programs. -
The statement
set_resource_library to ""will always set the resource library to the.VDFfile of the running program that contains the statement (the default).