heeeelo strange problem here but ... :)

Hello. I want to write a program in which there is an Image component (simple:)). and when a user presses a button, the displayed image should be changed (I want to store the images in the folder //images and then load them with the command Image->Picture->LoadfromFile).
But first I need to construct the path to the file, which is located somewhere in the program's path.
Now the question - how to display that image and get the path in which the program was originally started?
Thanks for help
Marek

Comments

  • : Hello. I want to write a program in which there is an Image component (simple:)). and when a user presses a button, the displayed image should be changed (I want to store the images in the folder //images and then load them with the command Image->Picture->LoadfromFile).
    : But first I need to construct the path to the file, which is located somewhere in the program's path.
    : Now the question - how to display that image and get the path in which the program was originally started?
    : Thanks for help
    : Marek
    :
    :

    You may try something like that:

    #include

      AnsiString mydir=GetCurrentDir();
      AnsiString myPictureDir=mydir+"\picturename.jpg";
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion