Aqua Buttons with GDI+x and VFP
Class uppdated with Builder Preview 30/09/2008
The class in the attached zip, is an example of what you can do to spruce up your application. It contains an AquaButton class which uses the Imgcanvas object from the GDI+x classes on Codeplex.
This class is very easy to use especially since I have added in a Builder. It is just a matter of dropping an instance of the class on a form, setting the properties manually or using the provided builder and Bob's your Uncle.

The class needs just a few properties as shown here. All properties that can be changed are in the "Favourites" tab.
- bCaption - the caption to be displayed on the button
- buttonfont - the font to be used for the button text
- buttoncolour - the ARGB colour to be used for the button. Better to use the builder for this.
- buttonfontcolour - the colour of the button text. See the point above.
- buttonfontsize - size of the button text font.
The item AquabuilderX is the builder used for setting all these properties in one shot.. When you select it, a button appears which if clicked, will display the custom builder, included in the class.

Set the properties of the selected Aquabutton using the builder. Click Apply to apply these changes and update the preview.

And run the form. The GDI+x classe does its magic and produces this clickable button with an Aqua look, for the properties set as above. Notice the shadow as well?

The button has a "Hover" effect and changes colour when the mouse is over it.

As well, it has some animation so that you can get feedback when it is clicked.
Here are some other samples I did earlier. As you can see you can have then any size or shape as long as they are rectangular.
The sample shows the buttons on a form as well as in a container.

Cesar, Bo and Craig have done a fantastic job in translating the .NET classes into a VFP class that is very easy to use. There are heaps of samples all over the internet and since these classes emulate the .Net classes, any C# or VB code can easily be translated into VFP.
With a little imagination, this class can be used to enhance your GUI as well as provide a number of enhancements to your Class Library arsenal. Over the next few months I will be adding to the series of posts by Cesar, on this class, with a number of posts my own, showing some practical examples of usage. Hopefully it will encourage others to start using these classes and benefit from them.
Also I want to say that I have been looking at these classes for a few weeks only and the support I received from Cesar and Bo, for my various queries, was really out of this world. Thanks guys.
Note:
As mentioned in other posts,
I dont include the gdiplusc.vcx since you need to download the latest from the VFPx site.
Just open the form in VFP and when it asks you for the Imgcanvas navigate it to the gdiplusx.vcx on your computer. The form will then resolve the location correctly. Save the form, set the default path to the directory where the form is (to find the images) and then run the form. I have subclassed the imgcanvas class from the gdiplusx.vcx class library. Unfortunately this would happen since I don't supply the gdiplusx.vcx and I don't know where a user might have stored it.
Enjoy.