[Gambas-user] Coding problem

Fabien3D creafab at ...402...
Sat Apr 3 17:03:48 CEST 2004


Le Samedi 3 Avril 2004 10:52, Benoit Minisini a écrit :
> On Saturday 03 April 2004 10:43, Benoit Minisini wrote:
> > On Saturday 03 April 2004 11:43, Fabien3D wrote:
> > > Thanks for the reply, but some things are still too weird for me !
> > > This is the modified code according to your advices :
> > >
> > > PUBLIC SUB Main()
> > >
> > >   hImage AS Image
> > >
> > >   i AS Integer
> > >   j AS Integer
> > >
> > >   hImage = NEW Image
> > >
> > >   hImage = hImage.Load("/home/fabien/Economiseur_ecran/Panoramique
> > > Uluru_1.jpg")
> > >
> > > END
> > >
> > > PUBLIC SUB Form_Open()
> > >
> > >   pcbScreenSaver.X = 0
> > >   pcbScreenSaver.Y = 0
> > >
> > >   pcbScreenSaver.Picture = hImage.Picture
> > > 'This line code doesn't work apparently because the compiler doesn't
> > > know what hImage is !
> > >
> > >   pcbScreenSaver.Visible = TRUE
> > >
> > >
> > > END
> > >
> > > What am I doing wrong ?
> >
> > You must learn the difference between a local variable and a global
> > variable :-) Is it your first program ?
>
> And I didn't write hImage = hImage.Load(...) but just hImage.Load(...). The
> Load() method returns nothing - The automatic completion should tell you.
VB6 habit PictureBox.Picture = LoadPicture(filetoload) !
-- 
Fabien3D

CREAFab, la création numérique autrement...
http://creafab.free.fr





More information about the User mailing list