Some elements of the W$BITMAP print screen feature deserve special mention in the context of a thin client deployment, particularly the following functions. Full details regarding all W$BITMAP features can be found in the appendix "Library Routines" in ACUCOBOL-GT Appendices.
WBITMAP-CAPTURE-IMAGE usage is as follows:
CALL "W$BITMAP" USING WBITMAP-CAPTURE-IMAGE filename [window-handle] [client] [colordepth] GIVING [result].
If filename is specified, the image is stored in the named file on the server, not the client machine. For example, with the following code:
CALL "W$BITMAP" USING WBITMAP-CAPTURE-IMAGE "c:\myfile.bmp".
the bitmap image is stored as myfile.bmp in the c:\ directory on the server. In this example:
CALL "W$BITMAP" USING WBITMAP-CAPTURE-IMAGE "myfile.bmp".
myfile.bmp is stored in the working directory specified in the alias file. If you want the file stored on the client, use the C$COPY library routine to transfer it to the client. See Copying Files Between the Client and Server for more information.
If filename is not specified or is set to a space, the image is placed on the client machine's clipboard.
The setting of "colordepth" is important to consider in a thin client deployment. Because color density is a memory-intensive setting and the image may be transferred over network connections, a combination of high resolution and low bandwidth can have a negative effect on thin client application performance. Consider how the image is being used and set the color density only as high as needed.
The descriptions of filename and "colordepth" in the previous paragraphs also apply to their usage in the WBITMAP-CAPTURE-DESKTOP function of the W$BITMAP library routine.
The WBITMAP-CAPTURE-CLIPBOARD function copies the current bitmap content of the client machine's clipboard. The description of "filename" in the previous paragraphs also applies to its usage in WBITMAP-CAPTURE-CLIPBOARD, except that for this function, filename is mandatory.