PC Review


Reply
 
 
Ash Phillips
Guest
Posts: n/a
 
      23rd Oct 2004
Is there any alternative to App.Path in VB .NET?

Also App.Major/Minor/Revision?

Thanks in advance!


 
Reply With Quote
 
 
 
 
Ken Tucker [MVP]
Guest
Posts: n/a
 
      23rd Oct 2004
Hi,

Application.StartupPath, Application.Version. Application does not
alway return the right result. Here is what i use.

Public Function AppPath() As String

Return
System.IO.Path.GetDirectoryName(Reflection.Assembly.GetEntryAssembly().Location)

End Function



Ken
--------------------
"Ash Phillips" <(E-Mail Removed)> wrote in message
news:Oiz$(E-Mail Removed)...
Is there any alternative to App.Path in VB .NET?

Also App.Major/Minor/Revision?

Thanks in advance!



 
Reply With Quote
 
james
Guest
Posts: n/a
 
      23rd Oct 2004
Also don't forget to use:

Imports System.IO
Imports System.Reflection

It seems if I leave those two out I end up with problems. Otherwise, Ken's
suggestion seems to work the best of all solutions .
james

"Ken Tucker [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> Application.StartupPath, Application.Version. Application does
> not
> alway return the right result. Here is what i use.
>
> Public Function AppPath() As String
>
> Return
> System.IO.Path.GetDirectoryName(Reflection.Assembly.GetEntryAssembly().Location)
>
> End Function
>
>
>
> Ken
> --------------------
> "Ash Phillips" <(E-Mail Removed)> wrote in message
> news:Oiz$(E-Mail Removed)...
> Is there any alternative to App.Path in VB .NET?
>
> Also App.Major/Minor/Revision?
>
> Thanks in advance!
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
doskey doesn't work; PATH only sets after first Java compile; then resets to old PATH joe Windows XP Help 4 14th May 2008 02:55 PM
how to judge whether a path is relative path or absolute path thinktwice Microsoft Windows 2000 CMD Promt 20 7th May 2008 11:06 PM
An exception occurred in the OnBeforeInstall event handler of <name> Access to the path <path> is denied. Andrzej Lipski Microsoft Dot NET 0 5th Oct 2007 04:24 PM
set path, change path - path grayed out John Smith Windows XP Help 1 12th Feb 2005 01:56 PM
set path, change path - path grayed out John Smith Windows XP General 1 12th Feb 2005 01:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:02 PM.