Development Topics > Tab() Functions > Tab(-10,x) Functions

Display Wallpaper

? tab(-10, AG_WALLPAPER); bmpspec; {comma; op;} chr(127);

AG_WALLPAPER (39) provides a way to display a bitmap file as “wallpaper” for the background of the main A-Shell window.

Parameters

bmpspec

File specification of a bitmap (BMP) file to use as wallpaper. Either AMOS or native syntax may be used, but it will be interpreted relative to the PC. (So if running on a UNIX server with ATE, you must arrange for the file to be present on the PC before you can invoke it.)

op

Code

Description

0

(default) Load new wallpaper, deleting any old wallpaper. If bmpspec is null, then it just deletes any existing wallpaper.

1

Clear current wallpaper but save it.

2

Restore previously saved wallpaper.

+4

(Add 4). Normally, the wallpaper save and restore operations are destructive in the sense that "save" clears the current wallpaper, and an attempt to restore when there is no saved wallpaper will effectively delete the current wallpaper. To accommodate applications that want to be able to issue redundant save and restore operations, you can add 4 to the OP parameter. Part of the incentive for this feature is that restoring a previously saved wallpaper is much faster than re-loading it from disk.

 

Examples

Load examples:

? TAB(-10,39);"bmp:pinup1.bmp";chr(127);

? TAB(-10,39);"c:\my documents\wallpaper\rainforest.bmp";chr(127);

? TAB(-10,39);"%MIAME%\bitmaps\clouds.bmp";chr(127);

? TAB(-10,39);".\my life in pictures.bmp";chr(127);

? TAB(-10,39);"";chr(127);       ! (remove wallpaper)

 

Other examples:

? TAB(-10,39);",1";chr(127);     ! Save (and then clear) wallpaper

? TAB(-10,39);",5";chr(127);     ! Save (but don't clear) wallpaper

? TAB(-10,39);",2";chr(127);     ! Restore wallpaper; clear saved copy from memory

? TAB(-10,39);",6";chr(127);     ! Restore wallpaper only if there is saved wallpaper

 

Notes

Wallpaper is generally only useful when you are going to display a dialog on top of it. Otherwise, unless the wallpaper is very subtle, it makes it difficult to read text displayed on it. VUE and EZTYP temporarily disable the wallpaper (using op 1 and 2). Only BMP files are supported.

The "load" command also automatically "saves" a copy if there is not already a saved copy. Thus you can do a load followed by a restore without a save.