Distributing resources separately

When a resource is referenced at runtime, if the resource has not been included in the executable file or in a dynamic library, PowerBuilder looks for it in the search path. You need to distribute resources with your application and make sure they get installed in the user's search path.

For example, assume you use two bitmap files as in the following script:

IF Balance < 0 THEN
   p_logo.PictureName = "frown.bmp"
ELSE
   p_logo.PictureName = "smile.bmp"
END IF

You can distribute the files frown.bmp and smile.bmp with your application. If the files are on the search path at runtime, the application can load them when they are needed.

The Windows search path is as follows:

  1. The current directory

  2. The Windows directory

  3. The Windows system directory

  4. All directories in the PATH environment variable