Load Picture to picture object during runtime

How to load a picture during runtime. Are there any function to retrieve the
path of the program?

I've tried the following:
Picture1.LoadFromFile('Config\picture1.jpg');

This works only if the current path is set to my program path

Juergen

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 7:50PM
    either pass the path into the report as a variable when loading or
    use te report components onbefore print event.
    ;)
  • dschuchdschuch Dresden,Germany
    edited 7:50PM
    Yes,

    in Delphi :

    frxReport1.Variables:=''''+ExtractFilePath(ParamStr(0))+'''';

    in FR :

    Picture1.LoadFromFile(<MainPath>+'picture1.jpg');

    Daniel
  • edited 7:50PM
    Thanks a lot Daniel.
    I thought that there are predefined variables/functions
    in the script itself.

Leave a Comment