Navigation:  Reference > Commands >

Load Picture

Print this Topic Previous pageReturn to chapter overviewNext page

 

This command will load a picture (either file or field) into a TImage object that exists on a form.

 

LOAD_PICTURE f/c/e Required - This is the name of the TImage object.  The object must exist on the current form.

 

FILE f/c/eIf you are loading the picture from a file on the disk this is the file name.  Must include complete path if it is not in the current path and the file extension.

 

FIELD fn/vIf you are loading the picture from a field this is the field name. NOTE:  At the current time you can only store a picture in a field as a .BMP file format.

 

 

COMMENTS

You cannot load a picture using the standard SET_OBJECT command referring to the Picture property, you must use this command.  Also, you must specify either the FILE or FIELD option in the command.  You cannot have both.

 

Sample

loadpic:

    // BKPR.EMP.NOTES[7] is a defined fld and will hold the pathname and file name 

    If BKPR.EMP.NOTES[7] <> ''

      If FILE_EXISTS(bkpr.emp.notes[7])  

      // you need To check To make sure 

      // the file exists before you load 

      // a picture Or you will Get an error.

        LOAD_PICTURE 'image1'  FILE BKPR.EMP.NOTES[7]

        Set_Object 'image1' property 'visible' value true

      endif

      ret

    Else

      Set_Object 'image1' property 'visible' value false

     ret

    endif

 


Page url: http://www.cassoftware.com/tas/manual/loadpicture.htm