Here's another very simple code that attends Bernard Bout, creating an image on the fly, based on his post entitled "Using the Alpha Channel in Visual Foxpro Images". Again in this sample, I'm using the new GdiPlus-X classes from VFP-X project that can be downloaded from here: http://www.codeplex.com/Wiki/View.aspx?ProjectName=VFPX&title=GDIPlusX
Hope this helps Bernard !
Target Image: MainForm.png

* Helper code to create image on the fly for
* Bernard Bout "Using the Alpha Channel in Visual Foxpro Images"
* http://weblogs.foxite.com/bernardbout/archive/2006/09/11/2436.aspx
* Image Dimensions 300 x 270 pixels
* Make all image totally transparent
* Draw a light yellow - RGB(254,254,228) rectangle
* centered in the main image.
* Save as PNG, to preserve the transparencies
DO LOCFILE("System.App")
WITH _SCREEN.System.Drawing
* Create an empty bitmap
LOCAL loBitmap AS xfcBitmap
loBitmap = .Bitmap.New(300,270)
* Initialize the graphics object
LOCAL loGfx AS xfcGraphics
loGfx = .Graphics.FromImage(loBitmap)
* Make all image transparent
loGfx.Clear(.Color.FromARGB(0,0,0,0))
* Draw the yellow rectangle
loGfx.FillRectangle(.SolidBrush.New(.Color.FromRGB(254,254,228)), 10,9,278,249)
* Save as PNG to keep transparencies
loBitmap.Save("c:\BernardBoutAgain.png", .Imaging.ImageFormat.Png)
ENDWITH
RETURN