Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Way to save images on clipboard to file and vis-versa
Message
From
12/11/2001 06:02:15
 
 
To
07/11/2001 13:00:15
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00578601
Message ID:
00580381
Views:
27
This message has been marked as the solution to the initial question of the thread.
Hi!

Well, one more solution that use MS Word OLEAutomation. At least this works for MS Word 2000.
Do these actions manually first to see how it works. The write the macro for these actions for Word to see the VB code and then convert that code to VFP code calling hidden Word object though OLE Automation.

1. Copy some image into clipboard
2. Paste it into the new MS Word document.
3. Save that document as HTML into some temporary folder and close the Word.

This will create the main HTM document and a folder that contains supporting files include... PNG and JPG representation of image! Now just examine if there is an image file in that folder (to see if image is in clipboard. JPG image is bad quality though and I did nto found where to adjust a quality of it. PNG image is ok though.

See if this can help. It seems that this approach might work much slower than others, but it is, indeed, very simple to implement.

>Anyone have suggestions on how we might be able to detect the presence of image data on the Windows clipboard and save this image data to a file? We would also like a way to load the contents of an image file to the clipboard where the image could be pasted into other applications. There are probably issues about image formats (ico, bmp, gif, jpg) that I should be worried about. Any thoughts on this 'worry' would be appreciated as well.
>
>Thanks!
>Malcolm
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform