http://www.vb-helper.com/HowTo/picfrm3.zip

	Purpose
Shape a form to fit a picture in 16-, 24- or 32-bit color

	Method
Use the CreateRectRgn API function to create regions for each horizontal
slice of picture that is not white. Use CombineRgn to combine these regions
and use SetWindowRgn to restrict the form to the combined regions.

Some points worth noting:

- The picture used in this example has a non-white bar at the top and is
  moved up so that bar lies under the form's title bar. That lets the user
  grab and drag that piece of title bar. If you move the picture down or
  erase the blue bar, the user will be unable to move the form.
- The form's Caption is " " so the title bar is present but blank. The
  ControlBox property is False so the buttons don't show.
- The bright spots on the spheres look white but they are slightly gray.
  If they were white, the form would have holes there.
- This program takes a little while to load. It would take longer for
  bigger pictures.

Thanks to Jon Windle (pman@optusnet.com.au) for modifying the program to work
with 32-bit color.

Thanks to Robert Heinig (rheinig@gmx.net) for modifying the program to work
with 15- and 16-bit color.

	Disclaimer
This example program is provided "as is" with no warranty of any kind. It is
intended for demonstration purposes only. In particular, it does no error
handling. You can use the example in any form, but please mention
www.vb-helper.com.
