Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I am in Phoenix anyone else
Message
From
14/10/2005 00:00:19
 
 
To
13/10/2005 03:44:44
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Conferences & events
Miscellaneous
Thread ID:
01057805
Message ID:
01059005
Views:
12
Hi Cetin

Thanks for your reply. Yes if it's an exe and if there are not too many I compile it into the exe.

This was not a question about that.

Rather, I read Craig's article on his blog and the line about the PictureVal stuck out and waved at me. I immediately tried to do this but failed. Hence the question on this UT.

I also have many Visual classes that I use in my GUI especially ones that simulate the Office 2003 look & Feel. Thus a button may have 4 bitmaps for 4 states (a la outlook) and the menu's and toolbars too may have bmp's associated with them.

I just thought that PictureVal would make my classes self dependant without having to depend on outside resources (bitmaps), having looked at other ways before and failed.

Looks like i'm out of luck though.

>Bernard,
>Whether you put in a property or not (if it worked) you ship your bitmaps, no? Including them in project works, no other action on your part, just set the picture property to filename.
>If you wish to use PictureVal instead you could put your image files in a table, something like:
>ImageID (char or int), ImageContent blob.
>and include this table in your project. A custom method in your image class might assign PictureVal based on its custom property keeping ID (or Tag property).
>Cetin
>
>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform