Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Adel Kadi
  Where is Adel Kadi?
 Fairfax
 Virginia - United States
 Adel Kadi
 To: Eric den Doop
  Where is Eric den Doop?
 Houten
 Netherlands
 Eric den Doop
 Tags
Subject: RE: Picture Problem On Form
Thread ID: 16149 Message ID: 16189 # Views: 2 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Friday, October 11, 2002 2:33:39 AM         
   


> > Hi everybody
> > I am working with VFP6 and i have form that have picture with a button "Get Picture" the field in the table for this picture
> > is "General " and what happen if i run the form and push the button "get picture" it will open the directory to choose one,
> > the problem is if i choose BMP the picture will be displayed as photo but if i choose Jpg or Gif or any other format it will
> > be displayed as an icon then i have to doubleclick to see it i don't see why this happen and here is the code i put on the
> > button:
> > LOCAL lcFileName
> >
> > lcFileName = GETPIC("", ;
> > this.Caption, ;
> > SELECTBUTTON_LOC)
> >
> > IF !EMPTY(lcFileName)
> > APPEND GENERAL recording_artists.photograph FROM (lcFileName)
> > thisform.Refresh()
> > ENDIF
> > Thanks in advance to everybody
> > kadi
>
> I'd rather not use general fields at all. Simply store the path to your file in a character field or a normal memo field and use a normal image control to display the graphics file.
> --
> Eric den Doop
> www.foxite.com - The Home Of The Visual FoxPro Experts
Thanks Mr/Eric for your response
I used Image and i changed the code to:
LOCAL lcFileName

lcFileName = GETPIC("", ;
this.Caption, ;
SELECTBUTTON_LOC)

IF !EMPTY(lcFileName)
ThisForm.pgfrelated.page4.image1.picture = lcFileName
GO RECNO()
REPLACE contacts.photo WITH lcFileName
thisform.Refresh()
ENDIF
Now after changing the code the picure will display and i save record next time open the form it is not there and if i add
APPEND BLANK Before replace it will add another new record to the hole table not only will add picture.
I don't know what am i doing wrong may be i forget somthing (getting Old i guess)
kadi

ENTIRE THREAD

Picture Problem On Form Posted by Adel Kadi @ 10/10/2002 3:18:44 AM
RE: Picture Problem On Form Posted by Eric den Doop @ 10/10/2002 8:56:42 AM
RE: Picture Problem On Form Posted by Adel Kadi @ 10/11/2002 2:33:39 AM