Am i doing it wrong or... i tried to use what you told me below and got this
Code:
 path:=pChar(ExtractFilePath(grafica.exeName));
I know it's wrong, but with what should i replace that to make it work?