KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Customizing wallpapers of input forms for your users
PRODUCT: 4D | VERSION: | PLATFORM: Mac & Win
Published On: September 27, 2002

Here is a creative means of displaying a background or wallpaper in your input form for each user. First, create a variable (e.g. vpic) on your input form, and assign the type as picture. Select "On Background" under the Picture Format field for your newly created variable. Next, add a few pictures into your picture library. (You can copy and paste them in from the clipboard.) Edit the form method to display a different picture for each individual user.

For example:

C_INTEGER(VpicID)
Case of
: (Current user="Bob")
VpicID:=880 `Bob's wallpaper has a picture ID of 880
: (Current user="Jack")
VpicID:=881 `Jack's wallpaper has a picture ID of 881
: (Current user="Administrator")
VpicID:=882 `Administrator's wallpaper has a picture ID of 882
: (Current user="Designer")
VpicID:=883 `Designer's wallpaper has a picture ID of 883
End case
GetMyPicture (VpicID;->Vpic)
`where VpicID is the picture ID number and Vpic is the variable that holds the picture.

The GetMyPicture method will take in two arguments, the picture ID number (VpicID) and a pointer to the picture variable in our form (Vpic). Here is the GetMyPicture project method:

C_INTEGER($1)
C_POINTER($2;picture)
picture:=$2
GET PICTURE FROM LIBRARY($1;picture->)

Whenever users log into the database, their unique pictures will be displayed in the input form where this method is called. To take this to the next level, you may customize the picture and prompt the users to display pictures of their own choice.