General information
Category:
Pictures and Image processing
Title:
Pushing an image resource to clipboard
Hi all API guru
I need to push a variable string containing a graphic file (format can be png, jpeg, GIF or BMP) into windows clipboard. No VFP function here.
The current temp code works... but is clumsy (it uses Alexander Golovlev's gpImage thru a temp file temp files to push the graphic string into a file and from then into clipboard). Not clean.
Any thing smarter than the code below is welcome!
LOCAL cBitmapFile,oGDIplus,oImgResource
cBitmapFile = "mytempfile"+SUBSTR(SYS(2015),3,10)+".GIF"
STRTOFILE(MyImageBitmapString,cBitmapFile)
oGDIplus = CREATEOBJECT("gpInit")
oImgResource = CREATEOBJECT("gpImage")
oImgResource.LOAD(cBitmapFile)
oImgResource.ToClipboard()
RELEASE oImgResource
ERASE (cBitmapFile)
RETURN
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only