[Gambas-user] Coding problem
Benoit Minisini
gambas at ...1...
Sat Apr 3 10:52:43 CEST 2004
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.
--
Benoit Minisini
mailto:gambas at ...1...
More information about the User
mailing list