GDI+X

been working off and on, on a set of, believe it or not, white buttons using gdi+x  so far they have come out pretty good looking. may complete them one day and post them.

what do you think?

unfortunately because of the amount of junk mail being generated from the weblog i have switched off comments. please post your comments, if any, at www.foxite.com

many times i have seen where there are grid controls that have an image as their background. now in vfp while it is not too difficult to display images in the grid, you just cannot get the effect as below.


avior:url(#ieooui) }

but with a little ingenuity and some technique this effect as above is certainly possible.

that's where gdi+ comes in. to achieve this you need the gdi+x classes found on vfpx and the imgcanvas class.

create a new class and base it on the imgcanvas class found in gdiplus.vcx.

as you should know, when using the… Continue reading

more than 2 years ago i started blogging on getting vfp to have transparent windows. no, not the fully transparent ones, but the vista like ones, where the window is transparent but the contents, including form objects, are opaque.

this was my first post as proof of concept:

http://weblogs.foxite.com/bernardbout/archive/2006/06/15/1838.aspx

and from proof of concept to the "real" thing http://weblogs.foxite.com/bernardbout/archive/2006/08/16/2261.aspx

with the technique described in detail here http://weblogs.foxite.com/bernardbout/archive/2006/08/27/2353.aspx

an alternate solution without forms - http://weblogs.foxite.com/bernardbout/archive/2006/09/11/2436.aspx 

and finally this long post using 2 forms :

http://weblogs.foxite.com/bernardbout/archive/2006/10/28/2765.aspx

of late i have been playing with the gdi+x classes and this is what i… Continue reading

the gdi+x samples have a form that displays a "halo" for text. so taking that idea i adapted it for these glowing buttons.

to use these buttons you will need the gdi+x classes on the vfpx site.

http://www.codeplex.com/wiki/view.aspx?projectname=vfpx&title=gdiplusx

click on the link on this page that says latest release of gdiplusx and download the latest stable release. do not download the beta as that is not complete and may not work properly.

i havd also posted a tutorial on how to use my classes including the supplied builder. you can find the post here. most of the points are… Continue reading

one of the things i wanted was to be able to drop an image object on my form, set its picture property to an image and have the image "reflection" visible, which gives a very good effect.

well now that we have the gdi+x classes that is no longer a wish, but a fact.

this implementation requires the gdi+x classes available from the vfpx site.go get them.

basically the imagecanvas is used, its picture property is set to your picture and the height of the reflection in pixels is set. that is all. note that you can also use the… Continue reading

important note:

gdiplusx uses the pictureval to load a png image into the imgcanvas object to get the transparent effect. vfp9sp1 does not support loading png images using the pictureval property. as such, you must have vfp9 sp2 to use these classes with the gdiplus classes v1.10.

alternately download the 1.20b version but change the rendermode property of my class  to 5. then these classes will work in vfp9 sp1.

i've been working on buttons recently using the gdi+x classes and there have been request for two things. 1. transparent buttons a la vista and taborder for the buttons.… Continue reading

there have been a number of requests for  a tutorial on how to use the gdi+x classes and the shiny glass buttons. i am used to using these classes, so wrongly assumed that all users were up to speed. so i decided to fix that and post a tutorial about how to install and use gdi+x and the button class.

also i have made some updates to the class. it now respects the enabled property. also updated is the builder. tooltips, colours & fonts remembered, and a live form preview, courtesy of paco. download below.

lets go...

step 1 -… Continue reading

in a previous post i showed a class to generate "aqua" buttons using gdi+x from codeplex.

this post is all about some modifications i made to that class to enable me to produce shiny glass buttons. also i did not explain the techniques in obtaining the effect. this post will fix that and i will try to explain as best i can, the inner workings of the class.

the glass button

basically the class uses a subclassed imgcanvas control from the gdiplus.vcx classes that you need to download from the link above. the classes init should not be touched.… Continue reading

the vfp image base class now has the rotateflip property where the image set as the picture property can be rotated and/or flipped.

the different states for the vfp control are:

0 - rotate0flipnone

1 - rotate90flipnone

2 - rotate180flipnone

3 - rotate270flipnone

4 - rotatenoneflipx

5 - rotate90flipx

6 - rotate180flipx

7 - rotate270flipx

(funnily enough these are exactly the same enumerations in the gdi+x classes.smile [:)])

however the image base class has a problem. it cannot show an image background as transparent if the rotateflip property is anything other than 0. this can esaily be illustrated in this images… Continue reading

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… Continue reading