Delphi and Kylix

Moderators: pritaeas
Number of threads: 7244
Number of posts: 19051

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
how do i get the application path? Posted by tijoen on 30 Mar 2004 at 6:40 PM
using vb its App.path
but in delphi, have no idea

help please?

thanks !
Report
Re: how do i get the application path? Posted by zibadian on 30 Mar 2004 at 9:35 PM
: using vb its App.path
: but in delphi, have no idea
:
: help please?
:
: thanks !
:
Use ExtractFilePath(ParamStr(0));
Report
Re: how do i get the application path? Posted by adibichea on 31 Mar 2004 at 1:13 AM
: using vb its App.path
: but in delphi, have no idea
:
: help please?
:
: thanks !
:
I use mostly

AppPath: String;

GetDir(AppPath, 0);
Report
Re: how do i get the application path? Posted by _yilmaz on 31 Mar 2004 at 5:31 AM
: using vb its App.path
: but in delphi, have no idea
:
: help please?
:
: thanks !
:

You can also use

GetCurrentDir

(it does not take any arguments)


Report
Re: how do i get the application path? Posted by zibadian on 31 Mar 2004 at 6:18 AM
: : using vb its App.path
: : but in delphi, have no idea
: :
: : help please?
: :
: : thanks !
: :
:
: You can also use
:
: GetCurrentDir
:
: (it does not take any arguments)
:
:
:
GetCurrentDir() won't always get the right directory, especially, when the user has opened files. This is because it might retrieve the directory in which the document was stored.
Report
Re: how do i get the application path? Posted by Ornot on 17 Apr 2013 at 9:09 AM
application.ExeName indicates that it gives you the file name and path, so what you would need to do is run it through the appropriate extract utility. For your purposes you could use:

s := ExtractFileDir(application.ExeName);

Hope that helps



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.