Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LoadFromFile() after a TOpenPictureDialog

Status
Not open for further replies.

beier

Technical User
May 6, 2006
10
DK
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?
 
you have to put the hole path instead "Bricks/Bricks.txt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top