>Hi Bernard,
>Where did that string came from:)
>PS:Storing it directly to a string preserves the data too. I don't see how this intermediate conversion works different. Didn't work for me. I get 'Property "PictureVal" value is too long' twice as soon as I paste.
>Cetin
>
Hi Cetin
I use this code as GETPIC.PRG:
ON KEY LABEL CTRL+P do getpic in c:\vfp9\getpic.prg
RETURN
FUNCTION getpic
LOCAL bb,cc,dd
bb = SYS(1270)
oPict = STRCONV(FILETOSTR(GETFILE('bmp')),13) &&encode to base64
_cliptext=oPict
RETURN
and then paste.
Yes as you too found out the property allows only small bitmaps to be stred. I tried it with the VFP.BMP that is installed in the VFP directory, and it worked, hence my elation. However on further testing and getting the errors you mention, I gave up.
The bitmap string data is truncated at a CHR(0) which is why the base64 works and the plain String will not always work. Did not work on VFP.BMP anyway.
I actually tried using custom properties to hold states for a button - Normal, MouseEnter,Selected and the PictureVal property and this worked with no disk access of any file.
But this failed with syntax errors when I tried with a bigger bitmap.
So it looks like I am going to haveto ship the BMP's with the VCX and SCX files.
Funny about Craig stating this on his blog though, that this display without diskaccess was possible.
He has'nt bothered to reply. Anyway... Thanks for your help in this.
Bernard