Quote Originally Posted by Realeg View Post
The path to the file is for me the big problem. I don't know how to make the application to load a texture file from the folder where the .exe is. For example, if the aplication is in C:\X-FOLDER\Y-FOLDER, how can i load a texture from Y-FOLDER without writing the whole path?To write instead of 'C:\X-FOLDER\Y-FOLDER\file.bmp\, just 'file.bmp'?
You can extract the executable path from the FileName of your executable file using:

Code:
MyAppPath := ExtractFilePath(Application.ExeName);
Also I strongly recomend you don't store your resource files in your application folder but instead create seperate subfolders for this like:
MyAppPath\Data\Images
MyAppPath\Data\Sounds
MyAppPath\Data\Videos
MyAppDataLevels
and so on.
This way you nicely organize your files so you can quickly find specific file manually when you need it.

When dealing with paths it is also good to make use of IncludeTrailingPathDelimiter method to make sure that all your paths are proprly ended with TrailingPathDelimiter character so you don't need to worry by yourself wheter specific API function returns path with or without the TrailingPathDelimiter