Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using of a picture

Status
Not open for further replies.

misulica

Programmer
Feb 8, 2003
43
RO
How can I put a picture into a memo field and then display it on a image control on a form.I'm using VFP 7
Thank you!
 
Use a binary memo field instead of a General field. You can use this line to get the file into the memo field:

Append Memo Img From <File> Overwrite

where Img is the name of the binary memo field. In Visual FoxPro 6.0, use an image control to display such a .JPEG file. This requires the following code in the Refresh event of the form:

Local lcFile
* Delete the previous image, if it exists
If File(This.Image.Picture)
Erase (This.Image.Picture)
Endif
* Create a new temporary file on disk
* SYS(2023) returns the current temporary path
lcFile = SYS(2023)+&quot;\&quot;+Sys(3)+&quot;.JPG&quot;
Copy Memo myTable.Img to (m.lcFile)
This.Image.Picture = m.lcFile

Now the question:where to put Append Memo Img From <File> Overwrite
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top