Author |
Message |
Eoin Baire #1 / 11
|
 Program Name & PATH
I know there must be a way to establish the directory from which a program was launched, but I can't for the life of me figure it out. Any suggestions ? Eoin Bairad Dublin Ireland
|
Mon, 06 Oct 1997 03:00:00 GMT |
|
 |
Adina Adl #2 / 11
|
 Program Name & PATH
Quote:
> I know there must be a way to establish the directory from which a > program was launched, but I can't for the life of me figure it out.
LaunchDir = App.Path -- Adina Adler
My opinions, and nothing but
|
Mon, 06 Oct 1997 03:00:00 GMT |
|
 |
Chuck Stua #3 / 11
|
 Program Name & PATH
Quote:
>Subject: Program Name & PATH >Date: 20 Apr 1995 17:56:27 GMT >I know there must be a way to establish the directory from which a >program was launched, but I can't for the life of me figure it out. >Any suggestions ?
Hi Eoin Search on-line help for the app object. ------------------------------------------------------------------------ Chuck Stuart - Mesquite TX USA VBTrace 2.00 is a runtime Procedure Trace, XRef, Debug, Profiler and much more. Shareware $49. http://www.apexsc.com/vb/ftp/coop/cstuart ftp.apexsc.com/pub/cgvb/coop/cstuart ------------------------------------------------------------------------
|
Mon, 06 Oct 1997 03:00:00 GMT |
|
 |
Jon Brierl #4 / 11
|
 Program Name & PATH
Quote:
>I know there must be a way to establish the directory from which a >program was launched, but I can't for the life of me figure it out. >Any suggestions ? >Eoin Bairad >Dublin >Ireland
BaseDir$ = App.Path This will only work in the IDE after you have saved the .MAK file. In the IDE it returns the path to the .MAK file. In the .EXE it returns the path the .EXE was started from. Amazing how simple it is, but it dosn't seem to be mentioned very often. Regards, Jon
|
Tue, 07 Oct 1997 03:00:00 GMT |
|
 |
K. McCracke #5 / 11
|
 Program Name & PATH
Quote: > I know there must be a way to establish the directory from which a > program was launched, but I can't for the life of me figure it out. > Eoin Bair=E9ad
App.Path -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Kevin McCracken
-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
|
Tue, 07 Oct 1997 03:00:00 GMT |
|
 |
Jim Townse #6 / 11
|
 Program Name & PATH
Quote: >I know there must be a way to establish the directory from which a >program was launched, but I can't for the life of me figure it out. >Any suggestions ? >Eoin Bairad >Dublin >Ireland
Right, but you owe me a beer. To find the directory from which it was launched: TheDirectory$ = app.path To find its name: TheName$ = app.exename Hey, check out some of my programs from my Web Page. It is at http://infomatch.com/~townsend/drc.html There are some nifty programs you can get off the page. Have fun! TTFN Jimi
|
Wed, 08 Oct 1997 03:00:00 GMT |
|
 |
Ken Aitke #7 / 11
|
 Program Name & PATH
|
Wed, 08 Oct 1997 03:00:00 GMT |
|
 |
Iliadis Ili #8 / 11
|
 Program Name & PATH
Quote:
>Path: >news.hol.gr!news-ath.forthnet.gr!news.forth.gr!news.ecrc.de!news.sprintlink.net! >howland.reston.ans.net!Germany.EU.net!ieunet!login.Ieunet.ie!ebairead
>Newsgroups: comp.lang.basic.visual.misc >Subject: Program Name & PATH >Date: 20 Apr 1995 17:56:27 GMT >Organization: Ieunet Limited >Lines: 8
>NNTP-Posting-Host: login.ieunet.ie >X-Newsreader: TIN [version 1.2 PL2] >I know there must be a way to establish the directory from which a >program was launched, but I can't for the life of me figure it out. >Any suggestions ? >Eoin Bairad >Dublin >Ireland
If you mean YOUR program (where it was launched from) then in your main form add the following code (in form_load): Static already as integer Dim loadpath As String If already = 0 Then already = 1 loadpath = CurDir$ If Right$(loadpath, 1) <> "\" Then loadpath = loadpath + "\" End If
|
Tue, 14 Oct 1997 03:00:00 GMT |
|
 |
Sabina Brvar-Ivanc #9 / 11
|
 Program Name & PATH
|> >I know there must be a way to establish the directory from which a |> >program was launched, but I can't for the life of me figure it out. |> If you mean YOUR program (where it was launched from) then in your main form |> add the following code (in form_load): Ajaj... What happened with app.Path and app.EXEName ? Take care, Sabina
|
Tue, 14 Oct 1997 03:00:00 GMT |
|
 |
Jon Brierl #10 / 11
|
 Program Name & PATH
Quote:
>> >I know there must be a way to establish the directory from which a >> >program was launched, but I can't for the life of me figure it out. >> >Any suggestions ? >> If you mean YOUR program (where it was launched from) then in your main
form >> add the following code (in form_load): Quote: >> Static already as integer >> Dim loadpath As String >> If already = 0 Then >> already = 1 >> loadpath = CurDir$ >> If Right$(loadpath, 1) <> "\" Then loadpath = loadpath + "\" >> End If >I thought it was app.path
It is. CurDir$ returns the current directory, which is usually C:\WINDOWS. App.Path returns the directory the program was run from. Regards, Jon
|
Wed, 15 Oct 1997 03:00:00 GMT |
|
 |
Ian Lyna #11 / 11
|
 Program Name & PATH
writes: Quote: > >I know there must be a way to establish the directory from which a > >program was launched, but I can't for the life of me figure it out. > >Any suggestions ? > >Eoin Bair?ad > >Dublin > >Ireland > If you mean YOUR program (where it was launched from) then in your main form > add the following code (in form_load): > Static already as integer > Dim loadpath As String > If already = 0 Then > already = 1 > loadpath = CurDir$ > If Right$(loadpath, 1) <> "\" Then loadpath = loadpath + "\" > End If
I thought it was app.path 88 db 888b 88 88 d88b 8888b 88 Ian Lynagh
88 d8' `8b 88 `8b 88 88 d8YaaaaY8b 88 `8b 88 Author of EdWin, a text editor. 88 d8""""""""8b 88 `8b 88 Get EW005.WRI on ftp.demon.co.uk 88 d8' `8b 88 `8888 in /pub/ibmpc/windows/edwin 88 d8' `8b 88 `888
|
Wed, 15 Oct 1997 03:00:00 GMT |
|
|