Products · Orders · Downloads · Support · Fixes · Free Stuff · Company · News · Home
Free Stuff - Application Frame Backgrounds 
Please Note: This item may not be re-packaged for sale or profit as an add-on to Clarion although you are free to use it within your applications and products and may freely distribute it to other Clarion developers if provided free of charge and prefaced with this notice.

 
 
 

I don't know about you, or your users, but I have a serious dislike for dull backgrounds in my application frames. To remedy this I created several groups of images for use as tiled background in my application frames.

The most popular of these, the series included here, I call felt... you know, the stuff that covers billiard tables. It's a unobtrusive, quiet, grain pattern. For me, the only thing worse than no background at all is one that is too busy and distractive. It is called a background so shouldn't that mean something that's simply, well, in the background not something that yells at you or distracts from the functionality or use of the product?

Also included is source (hand code in a C5 APP file), very similar to the source I use within my applications, to allow the user to select the background they prefer. This choice is retained in an INI that is not located in the application directory. Using the default location of an INI file provides support for each user to select their preferred background. If I had used an INI file located in the application directory it would be overwritten by each user upon selection. The selected background could just as easily be maintained in a user preferences file or within the registry.

Background images are, in this example, disk based files that use a simple numeric naming convention. The first character in the file name depicts brightness (1=brighter, 6=darker) and the second and third characters depict the color scale (01 to 16). Beyond this you can use either JPG, GIF or BMP file formats. (Jpeg's are provided for download)

The example uses the DIRECTORY() function and looks for backgrounds, in order: JPG, GIF and BMP. When one group is found the others are ignored. If none are found an error message is displayed but this is for the example.

 
 
DIRECTORY(FileQueue,'*.jpg',0)
IF NOT RECORDS(FileQueue)
  DIRECTORY(FileQueue,'*.gif',0)
  IF NOT RECORDS(FileQueue)
    DIRECTORY(FileQueue,'*.bmp',0)
  END
END
IF NOT RECORDS(FileQueue)
  MESSAGE('|Sorry. No background images were located....
  RETURN
END
 
 

You do not need to provide all of the images, but all images supplied must be the same image type. The procedure that displays the images for selection reads the directory contents so any files not used are simply not known to the procedure and are therefore ignored. In other words, the file names are not hard coded into the application, at least in this example.

This disk based method is the method I generally use to prevent the application from becoming too large from embedded image resources. It also provides an easy way to update or add to the existing background images without the need for a recompile.

I hope you find it of some use. Enjoy!

VIEW FELT BACKGROUND SAMPLES

Download Source     Download Jpeg Image Zip
    

 
 

 

 
 
Products · Orders · Downloads · Support · Fixes · Free Stuff · Company · News · Home


Copyright© 2007, DeveloperPLUS.
"Clarion Add-ons" and the "Clarion Add-ons" logo are trademarks of DeveloperPLUS.
(legal)