Pictures

If I use Foxpro interactively I can use the browse window, a general field and I can cut and paste in pictures - .gif, .bmp etc.
When I write/compile and application, cut & paste  is no longer available.  The pictures often change and I have to distribute them on CD.  Any suggestions?

LVL 1
ldonnersAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cbasozCommented:
Cut&paste is available if you define a menu with cut,copy,paste options.

define popup _medit
DEFINE BAR _med_slcta OF _medit PROMPT '' KEY CTRL+A
DEFINE BAR _med_paste OF _medit PROMPT '' KEY CTRL+V
DEFINE BAR _med_copy OF _medit PROMPT '' KEY CTRL+C
DEFINE BAR _med_cut OF _medit PROMPT '' KEY CTRL+X
DEFINE BAR _med_redo OF _medit PROMPT '' KEY CTRL+R
DEFINE BAR _med_undo OF _medit PROMPT '' KEY CTRL+Z

Having this code is enough to get cut,copy,paste functionality. You don't need to activate nor show a menu.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cbasozCommented:
BTW this wouldn't apply to files on CD. They're readonly.
cbasozCommented:
I suggest not to keep pictures themselves as general field on a table. Instead keep path&filenames and show with an image control or web browsr control.
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

CarlWarnerCommented:
What you're doing in interactivate mode in your development copy of VFP is the manual way.

As far as the runtime version, you can just treat those general fields in any specific tables as you would any other data by using a REPLACE, a SQL INSERT, or a SQL UPDATE to add or change the contents of any general field you wish.

The following MS KB article gives more detail on this (read for concept, not for the exact task they're performing):

Transferring Data Between General Fields Programmatically
http://support.microsoft.com/default.aspx?scid=kb;en-us;131306

Further reading:

How To Programmatically Embed and Link Part of a File
http://support.microsoft.com/default.aspx?scid=kb;en-us;100444
CarlWarnerCommented:
While you may have the pictures working fine for now in general fields, it's better for performance reasons and fpt file bloat issues to keep the images external to the database and its associated tables.  For a good answer on this area, read the older posted message by Christof Lange on this at:

http://www.experts-exchange.com/Databases/FoxPro/Q_10477639.html#2990352
ldonnersAuthor Commented:
Curiously Microsoft Support came up rapidly with an elegant solution.  This was to set up procedures (I used .prgs) and On Key commands.

After 20 years of trying I've never had any response for anything from Microsoft before despite myriad requests, so this was a welcome change.  

As a result I can now cut and paste pictures into a general field and my users can now create interactive catalogs from their own digital artwork.  Microsoft did assure me that there is NO plan to extend the facility into the standard Foxpro product.  Cut and paste works fine in the standard interpreted version but will not work in a compiled application - so this is a good workaround.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
FoxPro

From novice to tech pro — start learning today.