Shade Form Demo ReadMe

The "chiseled steel" pattern used by Borland controls is simply
a pattern of gray and white pixels that looks like this:  

	XXXXXXXX
	X X X X 
	XXXXXXXX
	X X X X
	XXXXXXXX
	X X X X
	XXXXXXXX
	X X X X

This pattern can be reproduced on Visual Basic forms by painting
the form with the pattern.  The drill is this:

1.	Create an 8x8 bitmap with the above pattern (included as
	steel.bmp)

2.	Place the picture in a hidden picture control on the form
	to be shaded

3.	Use API call (CreatePatternBrush) to create a pattern brush 
	based on the bitmap  (See Declarations in GShade.bas and 
	ShadeForm procedure in Shades.Frm)

4.	Use API call (FillRect) to paint pattern on the form.  (See
	ShadeForm procedure in Shades.frm.)

5.	Delete the pattern brush with DeleteObject.

You have two choices for maintaining the pattern, and each has its penalty:

	First, you can turn autoredraw on before calling ShadeForm 
	and then turn it off after ShadeForm is done.  The big dis-
	advantage to this approach is that the saved image takes up
	about 450K of system memory on an 800x600 screen.  Ouch!  
	(Note: this is not unique to this procedure.  AutoRedraw
	does this to you whenever you set it for the form)
	another disadvantage is that the procedure only paints the 
	visible portion of the screen, so if the user enlarges the
	form, the newly visible portion will not have the pattern 
	on it.

	Second, you can put the ShadeForm procedure in the Paint event
	and it will get called as needed automatically.  (This is how
	it's done in this demo)  This saves memory, and also paints the 
	entire form whenever the user enlarges it.  The disadvantage to 
	this approach is that the screen flashes whenever it's redrawn.  
	The FillRect procedure is VERY FAST, but it still creates a 
	distracting flash. This can be mitigated somewhat by making the 
	background color of your form grey so that it flashes grey 
	rather than white.

You can substitute other patterns for steel.bmp.  I have included
several patterns, including a light grey (ltgrey.bmp) which replicates 
the shading used in CentralPoint's Backup and Undelete programs. 

Enjoy!

Brian Stine,  CIS ID 73617,323