>>>
>>>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.
>>>Bernard
You can try using custom methods that assign the string to PictureVal
But you need to limit the command line to 8k.
FUNCTION getPic
#DEFINE CRLF CHR(13)+CHR(10)
LOCAL cFlag, cPict, i
cFlag = '0'
cPict = STRCONV(FILETOSTR(GETPICT()),13)
_cliptext = [STRCONV( ;] + CRLF
FOR i=1 TO LEN(cPict) STEP 80
IF cFlag = '0'
_cliptext = [] + _cliptext + ["] + SUBSTR(cPict, i, 80) + [" ; ] + CRLF
cFlag = '1'
ELSE
_cliptext = [] + _cliptext + [+ "] + SUBSTR(cPict, i, 80) + [" ; ] + CRLF
ENDIF
NEXT
_cliptext = _cliptext + [, 14)]
RETURN