Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Do I store image data in PictureVal
Message
From
17/10/2005 02:33:00
 
 
To
16/10/2005 23:36:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01057389
Message ID:
01059550
Views:
21
>>
>>If you are picky you can say that everything comes from disk in the first place, so what's your point?
>>
>
>Since you ask, and appear not to have read my original post, my point is this:
>
>A class (ideally) is supposed to work without any external files or resources. In my class I have many images that at the moment I have to store on disk and also supply with the class. (Note there is no mention of an EXE here).
>
>I read on Craig Berntson's blog where he says that using the PictureVal you don't need to access files on disk anymore. Thinking this was a solution to my problems, I further investigated and on failing to use this property to actually STORE anything useful, I came to the UT with my questions, hoping for some enlightenment.
>
>I already know about Blobs and exe files. That was not what I was looking for, but a way to store the actual bitmap in the Pictureval property so that I did not have to ship the BMP's. Besides I believed this was possible since an MVP had said so.
>
>That was my point. I hope I am clear. I am not picky, just looking for a particular solution. Since I already know about EXE files and blob fields, I am not really looking for solutions using those methods.
>
>Only a way to actually use the PictureVal property as it was meant to be used - to store an image at design time to display at runtime.
>

within a prg you can do this,
inside a VCX it is not possible because PictureVal propertiy
supports at the most 255 bytes:
_SCREEN.AddObject("OneImage","staticImage")
_SCREEN.OneImage.Visible = .T.

DEFINE CLASS staticImage AS Image
PictureVal = 0h424D7E01000000000000760000002800000018000000160000000100040000000000000000000000000000000000000000000000000000000000000080000080;
+	 0h00000080800080000000800080008080000080808000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF0080000000000000000000;
+	 0h00080777777777777777777777700F77777777777777777777700F88888888888888888887700F88888888888888888887700F88888808888888888887700F88;
+	 0h888800888888888887700F8888880F088888888887700F8888880FF00008888887700F888800FFFFFFF0088887700F8880FFFFFFFFFFF08887700F880FFFFFFF;
+	 0hFFFFFF0887700F880FFFFFFFFFFFFF0887700F880FFFFFFFFFFFFF0887700F880FFFFFFFFFFFFF0887700F8880FFFFFFFFFFF08887700F888800FFFFFFF00888;
+	 0h87700F88888800000008888887700F88888888888888888887700F88888888888888888887700FFFFFFFFFFFFFFFFFFFFF70800000000000000000000008

ENDDEFINE
>I can see no use for a property that needs to be set at runtime only. It might as well have been a method to call to access the file than to be a Property that you need to set at runtime and then be forced to write additional code to get the data and display.
>
>
>>At least I showed you a way to include the picture inside the exe and reduce the number of files for distribution, which I thought may be your concern.
>>
>>If you want to be able to show a picture on some canvas by a handle you may consider using some ActiveX component are Win API calls to do this kind of things.
>>
>>Bye, Olaf.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform