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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embedding Images to VFP?

Status
Not open for further replies.

Nitrodamsel

Programmer
Mar 10, 2010
9
PH
How can I possible to embed image in Foxpro? Any ideas theres no such info in the internet, I wanted to Allow user to upload their own images into the form? Is that possible?
 
Yes.
Take a look at images, adding to forms in VFP Help.

Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
 
"How can I possible to embed image in Foxpro?"

Embed where?

* As a background wallpaper to your VFP application?
* As a 'filler' within some object on a VFP Form?
* On a VFP Report Form?

"I wanted to allow user to upload their own images into the form?"

But once selected, how to be used in the form/application?

Good Luck,
JRB-Bldr
 
One 'generic' suggestion would be for you to develop the application with YOUR Image where you want it.

And then when a user selects a new image, replace the 'YOUR Image' image file with the selected one (retaining the original file name). In that way wherever your image used to show, theirs would now show.

Note that if you want individual users within a single networked company to separately select their own images you might want that image file saved locally to somewhere like:
C:\VFP\Application Image.jpg

Then each workstation would have their own image file which could be changed without affecting anyone else's image.

Alternatively you could utilize the user's Windows login name in the image file location directory name to individualize the selected images.

Good Luck
 
Its hard to explain , Example I am making a library system,
I want user to register in my form, they have the capability to upload their picture like saving a text on database is that possible?
 
So you are not wanting to utilize the image in the form or application itself, but rather to store the image file into some data table for reference purposes?

If that is so, as has been said many times in this forum by a variety of individuals, it is best not to store the image file itself in the data table. Windows already stores files well enough by itself.

Instead it is better to store the image file path & name along with any other associated information. Not only does this keep the data table size smaller by not having to store typically LARGE image file data, but it also allows for more flexibility.

Then, when the application needs to actually USE the image file (if it ever does), it knows where to find it and can access it as needed.

The user could select the image file by using the GETFILE() command, the application could copy/move the file to some pre-designated directory for actual file storage and then register the file's name and location into the VFP data table. That pre-designated file storage directory could, if desired, utilize Date, Username, Image Category, etc. as part of its name.

Good Luck,
JRB-Bldr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top