Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Picture
Message
From
15/04/2004 01:59:52
 
 
To
15/04/2004 01:50:26
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00894721
Message ID:
00895020
Views:
21
>Dear Alex,
>
>thank you,
>
>remark: my picture (.bmp)
> field name is (pic).
>
>when i put (thisform.image1.picture=pic)
>
>i get a meesage (operation is invalid for agenaral field).

Mohammed. You cannot assign the general fields contents to the image object. The picture property expects a file name. You need to first extract the image from the general field to a disk file and then assign the disk file to the image picture property.
* setup temp file name
cPicFile = "C:\Temp\" + SYS(2015) + ".bmp"

* copy pic file to temp disk file
COPY MEMO pic.pic TO (cPicFile)

* set picture
thisform.image1.picture = cPicFile

* form runs, etc
...

* on form release cleanup the temp file
DELETE FILE (cPicFile)
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform