As subject states, I have trouble using LoadFromFile after having imported an image with a TOpenPictureDialog.
To import the picture, im using
if(OpenPictureDialog1->Execute())
{
Image1->Picture->LoadFromFile(OpenPictureDialog1->FileName);
paths[0]=OpenPictureDialog1->FileName;
}
and to load the file
Memo1->Lines->LoadFromFile("Bricks/Bricks.txt");
It occures if the image im loading isn't in the same folder as my pogram. I think is looking for the txt file in the image's folder /Bricks/Bricks.txt , wich doesn't exist..
is there any way to reset the default path to the folder the that pogram is located in?
To import the picture, im using
if(OpenPictureDialog1->Execute())
{
Image1->Picture->LoadFromFile(OpenPictureDialog1->FileName);
paths[0]=OpenPictureDialog1->FileName;
}
and to load the file
Memo1->Lines->LoadFromFile("Bricks/Bricks.txt");
It occures if the image im loading isn't in the same folder as my pogram. I think is looking for the txt file in the image's folder /Bricks/Bricks.txt , wich doesn't exist..
is there any way to reset the default path to the folder the that pogram is located in?