Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Mike Gagnon
  Where is Mike Gagnon?
 Pointe Claire
 Canada
 Mike Gagnon
 To: Bernard Bout
  Where is Bernard Bout?
 Brisbane
 Australia
 Bernard Bout
 Tags
Subject: RE: PictureVal property of Image Control
Thread ID: 78712 Message ID: 79042 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Classes and Objects
Date: Wednesday, October 12, 2005 12:57:11 PM         
   


Sorry, just trying to help. But the words design time were not evident in your original question. But to the best of my knowledge, no, this is only for runtime.


> This is going nowhere.
>
>
oPict = LOADPICTURE(GETPICT())

>
> and now oPict is of TYPE "Object"
>
> and from the helpfile
>
> The IPicture interface format is the same format returned by the LOADPICTURE( ) Function.
>
> oPict = LOADPICTURE(“myimage.bmp”)
> oForm.img1.PictureVal = oPict

>
> That's all very well. That's runtime code. The question was and still is :
>
> How to store anything in the Pictureval property so that there is no need of disk access at runtime.
>
> I just want to store in the Pictureval property something so that the image will display at runtime without having to resort to diskaccess at runtime. I know how to do it at runtime by accessing a disk file. I want to be able to set this property at desingtime and display at runtime. I don't know if I can be any clearer.
>
>
> I quote you again Mike:
>
> "This would indicate that you could store the data in the pictureval property and delete the imgage and still be able to show the image on the form."
>
> So what about it? Is your statement above doable or not. And if so HOW?
>
> Those are the only questions I want answers for. The other stuff I know about.
>
> Cheers
>
> Bernard
>
> > You are using the LoadPicture() function to create an instance of the image? If I omit the LoadPicture() it does nor work for me either.
> >
> >
> > > Hi Mike
> > >
> > >
> > > > 1. How to store the the actual image data in the PictureVal propertyThis means you don’t have to refer to a disk file to display the image.
> > > >
> > > >
> > > >
> > > > This would indicate that you could store the data in the pictureval property and delete the imgage and still be able to show the image on the form.
> > >
> > > Exactly what I wanted to do.
> > >
> > > I want to store the binary data in this property so that I dont need to depend on disk files to display the image. However I have been unable to get any proper binary data into this property. I have a feeling that there is some CHR(0) issue and that the binary data is being truncated, making this property useless.
> > >
> > > >
> > > > > Hi Mike
> > > > >
> > > > > I know how to display a picture. The point was about this from Craig Berntson's blog:
> > > > >
> > > > > You can use the PictureVal property of an Image object to hold the actual image data. This means you don’t have to refer to a disk file to display the image.
> > > > >
> > > > > > If you want to have the picture to show up when you run the form, store the binary info of the picture in the PictureVal property at design time.
> > > > >
> > > > > That's what I'm talking about. My code gets an object instance of the object the mouse is over. GETPICT() does the same as GETFILE() in my case and what is stored in the PictureVal property is "BMX" and the bitmap shows up at design time in the Image object. However on running the form, nothing shows.
> > > > >
> > > > > My questions are:
> > > > > 1. How to store the the actual image data in the PictureVal property
> > > > >
> > > > > 2. How is it that I don’t have to refer to a disk file to display the image.
> > > > >
> > > > >
> > > > > >
> > > > > >
oPict = LOADPICTURE(GETPICT())
> > > > > > this.PictureVal = oPict

> > > > > >
> > > > >
> > > > > This code you refer to above is Runtime code. This code WILL access the diskfile at runtime, which is not what Craig says.


ENTIRE THREAD

PictureVal property of Image Control Posted by Bernard Bout @ 10/7/2005 6:04:25 AM
RE: PictureVal property of Image Control Posted by Mike Gagnon @ 10/7/2005 11:38:01 AM
RE: PictureVal property of Image Control Posted by Bernard Bout @ 10/8/2005 6:30:13 AM
RE: PictureVal property of Image Control Posted by Mike Gagnon @ 10/8/2005 12:56:20 PM
RE: PictureVal property of Image Control Posted by Bernard Bout @ 10/10/2005 3:34:55 AM
RE: PictureVal property of Image Control Posted by Mike Gagnon @ 10/10/2005 1:25:23 PM
RE: PictureVal property of Image Control Posted by Bernard Bout @ 10/11/2005 5:22:29 AM
RE: PictureVal property of Image Control Posted by Mike Gagnon @ 10/12/2005 12:57:11 PM
RE: PictureVal property of Image Control Posted by Bernard Bout @ 10/13/2005 5:06:12 AM
RE: PictureVal property of Image Control Posted by Hans de Groot @ 10/13/2005 5:38:10 PM
RE: PictureVal property of Image Control Posted by Bernard Bout @ 10/14/2005 5:41:05 AM
RE: PictureVal property of Image Control Posted by Hans de Groot @ 10/14/2005 8:48:54 AM
RE: PictureVal property of Image Control Posted by mike castillo @ 10/14/2005 7:17:14 PM
RE: PictureVal property of Image Control Posted by Hans de Groot @ 10/15/2005 6:52:52 AM
RE: PictureVal property of Image Control Posted by Bernard Bout @ 10/17/2005 5:10:26 AM