Consider the following situation; a customer develops a graphical program, either using the Screen Painter of the IDE or coding everything by hand. The program contains an Screen with several bitmaps on the push-buttons that are entered as relative paths, they work ok if the program is running standalone however running on a client/server environment (Thin Client or WebClient for instance) there are more things to take into account. What are the options to make these bitmaps available to the program no matter where it's run?
The options for making your bitmaps available to W$BITMAP load at run time are:
The #3 is the best practice, especially for ISVs that will be installing on different systems.
Also, there is a way to load a bitmap from the client machine, approach that has two considerations: it can be faster because the request doesn't go to the server, however there is a caveat, this option needs to have the bitmaps in all the client machines.
Following some code snippets to illustrate the above suggestions:
Using relative path
CALL "W$BITMAP" USING WBITMAP-LOAD "resources ool.png" GIVING h-toolUsing only the bitmap name:
CALL "W$BITMAP" USING WBITMAP-LOAD "tool.png" GIVING h-toolLoading the bitmap from the client:
CALL "W$BITMAP" USING WBITMAP-LOAD-FROM-CLIENT "my-logo.png" GIVING h-logo
Article ID: 314
Created: November 26, 2020
Last Updated: November 26, 2020
Author: Support KB Author
Online URL: https://support.veryant.com/phpkb/article.php?id=314