Actually i had read the docs, i translated also... (but may be i have a bug in understand them, i dont know...)
anyway... so i cant do something like that > hImage.Load(Application.Path & "/nature.png") but i could not find a way to > hImage = Image.Load(Application.Path &/ "nature.png") Today i learn something about the usage of static methods Thanks! On Fri, 2010-12-31 at 14:43 +0100, Benoît Minisini wrote: > > Good morning to all, > > > > i make an example for the Image class. > > i want to demostrate the methods of Image class. > > the example will Clear Copy Draw Fill Flip Mirror Replace Resize > > Rotate Save Stretch a picture in an Image class and put the result in > > a PictureBox. > > > > Firstly i want the picture from an Image object to put it in a > > Picturebox without modify image. > > i use the following code: > > > > ------------------------------ > > PRIVATE hImage AS Image > > > > PUBLIC SUB Form_Open() > > > > ME.Center > > hImage = NEW Image(500, 375, FALSE) > > hImage.Load(Application.Path & "/nature.png") > > PictureBox1.Picture = hImage.Picture > > > > END > > ------------------------------ > > > > but the PictureBox1 at runtime is empty. > > Why? what am i doing wrong? > > I guess you didn't read the documentation of the Image class :-). > > Image.Load() is a static method. So: > > hImage = Image.Load(Application.Path &/ "nature.png") > > And you didn't specify which version of gambas you use. Please do make an > example for Gambas 3! > > Regards, > -- Regards, Demosthenes Koptsis. ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user