Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Bernard Bout
  Where is Bernard Bout?
 Brisbane
 Australia
 Bernard Bout
 Tags
Subject: PictureVal property of Image Control
Thread ID: 78712 Message ID: 78712 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: Classes and Objects
Date: Friday, October 07, 2005 6:04:25 AM         
   


Hi Guys

Has anyone successfully used the PictureVal property of an Image control to display an image?

I read recently in Craig Berntson's blog -

http://www.craigberntson.com/archives/2004_09_01_archive.asp

the following :

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.

I have tried but no picture shows at runtime. I used the following PRG to allow me to select a picture which is then stored in the PictureVal property of an image object on a form.

* getpicture.prg
**********************
ON KEY LABEL CTRL+P do getpix in c:\vfp9\getpicture.prg
RETURN
**********************
FUNCTION getpix
LOCAL bb,cStr,cFile
bb = SYS(1270)
IF bb.baseclassImage´
cFIle = GETFILE("BMP,JPG,GIF","Select Picture")
IF EMPTY(cFile)
    RETURN
ENDIF
cStr=FILETOSTR(cFile)
bb.Pictureval=cStr
ENDIF



I hover my mouse over the image and then press Ctrl+P. I then select a BMP - in my case fox.bmp in the VFP main directory. The picture shows up in the image object on the form and the property has some chrs in it.

However on running the form the picture is NOT displayed and the does not appear after that till I repeat the Ctrl+P stuff.

So how do you store the image in this property and display it without going to disk for it?

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