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

copy image to clipboard

Status
Not open for further replies.

sqlpro

Programmer
Dec 30, 2003
297
NZ
Hi friends
do you guys know how to copy an image to clipboard in VFP8
for example we can copy text to clipboard with _cliptext
command?
at the moment i am storing image into a dbf file then
copying it to clipboard.
i am wondering if there is any better way!!
Thank you very much
cheers
Rajani
 
Hi AirCon
I tried but with no success
the following line always returns 0(zero)

hBitmap = LoadImage(0, lc_Filename, 0, 0,0, 0x10)

i gave fulle image path (lc_Filename='c:\image1.jpg')
but still no luck
Thanks
 
Hi prajanikanth,

Sorry, I forgot to mentioned it only work for BMP file. Loading JPG file needs another technique.

-- AirCon --
 
is there any common proc which can copy any image to clip board i mean with any extn.

Thank you
cheers
rajani
 
I don't think a standard API can handle all image ext. Each image has it's own header structure that must be treated differently. (i.e. PNG, GIF, TGA and so on). I know JPG still can be load with OLE API, but I don't know about the others.

Maybe GDIPLUS already have this capability, but I haven't experiment with it so I'm not sure about that.

-- AirCon --
 
Ok AirCon nevermind
I'll stick to my existing code.
Thank you very much
cheers :)
Rajani
 
Yes. Much simpler.
I should have told you about the problem from the beginning :)

Regards

-- AirCon --
 
Its all right
I learned something from your code
cheers AirCon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top