Tried your solution, it dosen't work...
Tried your solution, it dosen't work...
Am i doing it wrong or... i tried to use what you told me below and got this
I know it's wrong, but with what should i replace that to make it work?Code:path:=pChar(ExtractFilePath(grafica.exeName));
Ahh now I see what is confusing you.
When I write use Application.ExeName I mean that literally.
You see in modern pascal dialects the Application is actually a global variable for TApplication class which contains several properties and methods. Best example of seeing this in use is looking ath the source of your project file (*.dpr file).
And one of its properties is ExeName which contains full filename of your application executable.
With Freepascal you can also use the "old school" way:
(No need for pChar as you can see.)Code:path:=ExtractFilePath(ParamStr(0));
Best regards,
Cybermonkey
Bookmarks