Monthly Archives: February 2007

That's a very easy task for Gdiplus-X:


All samples below use the Gdiplus-x library. Get the latest stable release from codeplex:

do locfile("")

with _screen.system.drawing

   local mybitmap as xfcbitmap
   && create a bitmap object
   mybitmap =

   && save the bitmap in different formats"c:\mypng.png", .imaging.imageformat.png)
save("c:\mybmp.bmp", .imaging.imageformat.bmp)
save("c:\mytiff.tif", .imaging.imageformat.tiff)
save("c:\myjpeg.jpg", .imaging.imageformat.jpeg)
save("c:\mygif.gif", .imaging.imageformat.gif)


Of course, you can save as jpeg… Continue reading

After all those posts discussing and showing how to create gradient backgrounds for vfp forms, I finally decided to create a simple but powerful class to ease this process.

The GradBackgrounds class is stored inside the gradientobjects.vcx, the class that was published last year that converts any commandbutton, graphical checkbox or graphical optionbox.

Just drop an instance of the class gradbackgrounds to any form, container or pageframe and set some properties to obtain the gradient effects shown below.

All the background images are created using gdi+, but with no helper class, because I wanted to obtain the best performance… Continue reading

Some types of files allow to store various icons together with other binary data, such as exes and dlls. .ICO files also allow to store more than one icon in a single file. Windows uses this a lot, and stores almost all the icons that it uses all the time in some dll or exe libraries.

The GdiplusX library can easily extract these icons, using the function “ExtractAssociatedIcon” from the xfcIcon class, as follows:


All samples below use the Gdiplus-X library from VFP-X project. Download the latest stable release from codeplex:



* the following… Continue reading

After some requests, i'm sending a new version of gpimage2, an adapted class from the original GpImage class from alexander golovlev.

This new version adds 3 new features to the previous version:
control smoothing mode, interpolation mode and a gradient brush.

Gdi+ originally offers 6 kinds of linear gradient brushes, and many possibilities for path gradient brushes, but to update Gpimage2 is not a priority any more because I think that the GdiplusX library brings much more value, and is compatible with the .NET "system.drawing" namespace.

So, if you still didn't upgrade to VFP9, you can download this new … Continue reading

Recently, MSDN added a new and very useful feature to the .net development site, the msdn community content. According to them, "msdn community content provides an infrastructure for users to comment, edit, and add content to the visual studio 2005 and .net framework 2.0 online documentation. (...) anyone can register for the site by signing in with a microsoft passport or windows live id and agreeing to the site terms of use and the participant code of conduct.  anyone who is registered and signed in to the site can create new community content and edit existing community… Continue reading