Oleboundcontrol

Hi Everyone,

This is my first time to post a question about VFP 6.0.  I want to display a .JPG pict on the oleboundcontrol but everytime i try to retrieve a .JPG it displays only the icon and not the actual picture.  It seems that it only supports the .BMP pictures, how can I get the .JPG and displays it.

Thank you in advance.


VFP avid fan


Answer this question

Oleboundcontrol

  • Vipul123

    Thanks for the response. I'm not sure if this is exactly what you meant but it works. I tried using the Image and created a table with a field type of Memo just like what you said and save the path and file name in that field. Below is the code, once the file name is saved I can navigate from one pict to another and displays the JPG pict.


    sele test
    if eof()
        wait wind "End of file encountered"
    else
        skip
    endi
    thisform.image1.picture = test.pict

  • Test 007

    Cetin's correct.

    Better yet would be to upgrade to VFP 9.0 to easily display JPGs and store them in a BLOB field.

  • Constantin Mihai - MSFT

    OleBoundcontrol stores info about the server that created the object. If server is not available (and a default one is not known like BMP:Paintbrush) then displays the icon. This is one of the reasons why you shouldn't use general fields.
     
    If you store the path&filename instead at runtime you could have an image control and simply change the picture property.
    If you really need the store the picture itself in table then again do not store to a general field but to a memo binary field. At run time, you could copy the contents to an external temp file and set Image.Picture property.

  • Oleboundcontrol