[Gambas-user] Using an Image in a PictureBox or help with my issue

Robert Moss the.at.robert at ...626...
Sun Nov 23 10:39:04 CET 2008


I get a Null Object error, and when i look at Picture.Image's properties in
the IDE, it looks like Image is readonly., even when i do
PicBox.Picture.Image.Load("filename") i get the same Null Object Error.

I've also noticed that you can NOT use the ^ and MOD operators in the same
expression =p

On Sun, Nov 23, 2008 at 1:07 AM, Werner <wdahn at ...1000...> wrote:

> Robert Moss wrote:
> > I need to use an Image because i need to be able to get pixel data (ie
> read
> > the color values in an image) via Image[x,y].
> > I would also like this image to be visible on screen, but the only box
> i've
> > found is PictureBox, which uses a picture, and it will not load an image.
> > (and pictures dont do pic[x,y])
> >
> > So I'd like to do:
> > 'PictureBox on form
> > Dim i as Image
> >
> > i = Image.Load("Myfile.jpg")
> >
> > PicBox1.Picture = i  'this is where error comes obviously as it wants a
> > picture, but i need to use images ^_^
> >
> > Message(str(Image[x,y]))
> >
> > Thanks so much
> >
>
> PicBox1.Picture = i  'this is where error comes obviously as it wants a
>
> try this:
>
> PicBox1.Picture.Image = i
>
> Regards
> Werner
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list