Home All Groups Group Topic Archive Search About

Application.ExecutablePath not recognisze by studio express 2005

Author
17 Jun 2006 4:48 AM
gs
I do want the path and the filename of the executable. However, visual
studio .net basic express 2005 rejects
    Application.ExecutablePath
Error 1 Name 'Application' is not declared. .....

question what should I import or what prefix I should use?

Author
17 Jun 2006 5:30 AM
gs
I think I got around the problem with

appPathFn = My.Application.Info.DirectoryPath & "\" &
My.Application.Info.AssemblyName

I  hope there is a simpler way.

Show quoteHide quote
"gs" <gs@dontMail.telus> wrote in message
news:uZITcjckGHA.3304@TK2MSFTNGP03.phx.gbl...
>I do want the path and the filename of the executable. However, visual
>studio .net basic express 2005 rejects
>    Application.ExecutablePath
> Error 1 Name 'Application' is not declared. .....
>
> question what should I import or what prefix I should use?
>
>
Author
17 Jun 2006 5:45 AM
Cor Ligthert [MVP]
gs.

The ExecutablePath is including the executable name
Teh application.startup path is the same without that

http://msdn2.microsoft.com/en-us/system.windows.forms.application.startuppath(VS.80).aspx

I hope this helps,

Cor

Show quoteHide quote
"gs" <gs@dontMail.telus> schreef in bericht
news:uZITcjckGHA.3304@TK2MSFTNGP03.phx.gbl...
>I do want the path and the filename of the executable. However, visual
>studio .net basic express 2005 rejects
>    Application.ExecutablePath
> Error 1 Name 'Application' is not declared. .....
>
> question what should I import or what prefix I should use?
>
>
Author
17 Jun 2006 5:51 AM
Cor Ligthert [MVP]
gs,

Please don't restart your questions in new threads, this is misleading for
those who try to help you, while it is very bad for searching this
newsgroup. It seems than if threads are not completely answered.

Thanks in advance.

Cor

Show quoteHide quote
"gs" <gs@dontMail.telus> schreef in bericht
news:uZITcjckGHA.3304@TK2MSFTNGP03.phx.gbl...
>I do want the path and the filename of the executable. However, visual
>studio .net basic express 2005 rejects
>    Application.ExecutablePath
> Error 1 Name 'Application' is not declared. .....
>
> question what should I import or what prefix I should use?
>
>